2022-06-05 19:10:50 +00:00
|
|
|
use std::sync::Arc;
|
2022-06-01 07:30:57 +00:00
|
|
|
|
|
|
|
use rand::rngs::OsRng;
|
|
|
|
|
2022-06-05 10:00:21 +00:00
|
|
|
use crate::{Coin, coins::monero::Monero, wallet::{WalletKeys, MemCoinDb, Wallet}};
|
2022-05-26 08:36:19 +00:00
|
|
|
|
|
|
|
#[tokio::test]
|
|
|
|
async fn test() {
|
2022-06-01 07:30:57 +00:00
|
|
|
let monero = Monero::new("http://127.0.0.1:18081".to_string());
|
|
|
|
println!("{}", monero.get_height().await.unwrap());
|
|
|
|
let mut keys = frost::tests::key_gen::<_, <Monero as Coin>::Curve>(&mut OsRng);
|
2022-06-05 10:00:21 +00:00
|
|
|
let mut wallet = Wallet::new(MemCoinDb::new(), monero);
|
2022-06-01 07:30:57 +00:00
|
|
|
wallet.acknowledge_height(0, 0);
|
2022-06-05 19:10:50 +00:00
|
|
|
wallet.add_keys(&WalletKeys::new(Arc::try_unwrap(keys.remove(&1).take().unwrap()).unwrap(), 0));
|
2022-06-01 07:30:57 +00:00
|
|
|
dbg!(0);
|
2022-05-26 08:36:19 +00:00
|
|
|
}
|