mirror of
https://github.com/comit-network/xmr-btc-swap.git
synced 2025-02-05 09:35:41 -05:00
Remove warning, fmt and make things compile
This commit is contained in:
parent
41310d860c
commit
cfb05994a6
@ -16,7 +16,7 @@ use monero_harness::Monero;
|
|||||||
use monero_rpc::monerod::{GetOutputsOut, MonerodRpc};
|
use monero_rpc::monerod::{GetOutputsOut, MonerodRpc};
|
||||||
use monero_wallet::MonerodClientExt;
|
use monero_wallet::MonerodClientExt;
|
||||||
use rand::rngs::OsRng;
|
use rand::rngs::OsRng;
|
||||||
use rand::{thread_rng, CryptoRng, Rng, SeedableRng};
|
use rand::{CryptoRng, Rng, SeedableRng};
|
||||||
use std::convert::TryInto;
|
use std::convert::TryInto;
|
||||||
use std::iter;
|
use std::iter;
|
||||||
use testcontainers::clients::Cli;
|
use testcontainers::clients::Cli;
|
||||||
@ -147,10 +147,11 @@ async fn monerod_integration_test() {
|
|||||||
let ecdh_key_1 = PrivateKey::random(&mut rng);
|
let ecdh_key_1 = PrivateKey::random(&mut rng);
|
||||||
let (ecdh_info_1, out_blinding_1) = EcdhInfo::new_bulletproof(spend_amount, ecdh_key_1.scalar);
|
let (ecdh_info_1, out_blinding_1) = EcdhInfo::new_bulletproof(spend_amount, ecdh_key_1.scalar);
|
||||||
|
|
||||||
let (bulletproof, out_pk) = monero::make_bulletproof(&mut rng, &[spend_amount, 0], &[
|
let (bulletproof, out_pk) = monero::make_bulletproof(
|
||||||
out_blinding_0,
|
&mut rng,
|
||||||
out_blinding_1,
|
&[spend_amount, 0],
|
||||||
])
|
&[out_blinding_0, out_blinding_1],
|
||||||
|
)
|
||||||
.unwrap();
|
.unwrap();
|
||||||
|
|
||||||
let k_image = {
|
let k_image = {
|
||||||
@ -373,18 +374,21 @@ mod tests {
|
|||||||
|
|
||||||
let relative_offsets = to_relative_offsets(&key_offsets);
|
let relative_offsets = to_relative_offsets(&key_offsets);
|
||||||
|
|
||||||
assert_eq!(&relative_offsets, &[
|
assert_eq!(
|
||||||
VarInt(78),
|
&relative_offsets,
|
||||||
VarInt(3),
|
&[
|
||||||
VarInt(10),
|
VarInt(78),
|
||||||
VarInt(0),
|
VarInt(3),
|
||||||
VarInt(5),
|
VarInt(10),
|
||||||
VarInt(2),
|
VarInt(0),
|
||||||
VarInt(3),
|
VarInt(5),
|
||||||
VarInt(11),
|
VarInt(2),
|
||||||
VarInt(1),
|
VarInt(3),
|
||||||
VarInt(1),
|
VarInt(11),
|
||||||
VarInt(3),
|
VarInt(1),
|
||||||
])
|
VarInt(1),
|
||||||
|
VarInt(3),
|
||||||
|
]
|
||||||
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -81,12 +81,12 @@ mod tests {
|
|||||||
let container = cli.run(Monerod::default());
|
let container = cli.run(Monerod::default());
|
||||||
let rpc_client = Client::localhost(container.get_host_port(18081).unwrap()).unwrap();
|
let rpc_client = Client::localhost(container.get_host_port(18081).unwrap()).unwrap();
|
||||||
rpc_client.generateblocks(150, "498AVruCDWgP9Az9LjMm89VWjrBrSZ2W2K3HFBiyzzrRjUJWUcCVxvY1iitfuKoek2FdX6MKGAD9Qb1G1P8QgR5jPmmt3Vj".to_owned()).await.unwrap();
|
rpc_client.generateblocks(150, "498AVruCDWgP9Az9LjMm89VWjrBrSZ2W2K3HFBiyzzrRjUJWUcCVxvY1iitfuKoek2FdX6MKGAD9Qb1G1P8QgR5jPmmt3Vj".to_owned()).await.unwrap();
|
||||||
let wallet = Wallet {
|
// let wallet = Wallet {
|
||||||
client: rpc_client.clone(),
|
// client: rpc_client.clone(),
|
||||||
key: todo!(),
|
// key: todo!(),
|
||||||
};
|
// };
|
||||||
|
//
|
||||||
let (lower, upper) = wallet.calculate_key_offset_boundaries().await.unwrap();
|
// let (lower, upper) = wallet.calculate_key_offset_boundaries().await.unwrap();
|
||||||
|
|
||||||
todo!("fix");
|
todo!("fix");
|
||||||
// let result = rpc_client
|
// let result = rpc_client
|
||||||
|
Loading…
x
Reference in New Issue
Block a user