Correct misc TODOs in monero-serai

This commit is contained in:
Luke Parker
2024-07-05 23:30:02 -04:00
parent 90880cc9c8
commit 1f5e5fc7ac
27 changed files with 266 additions and 111 deletions

View File

@@ -90,8 +90,7 @@ async fn mint_and_burn_test() {
use monero_wallet::{rpc::Rpc, ViewPair, address::Network};
let addr = ViewPair::new(ED25519_BASEPOINT_POINT, Zeroizing::new(Scalar::ONE))
.legacy_address(Network::Mainnet)
.to_string();
.legacy_address(Network::Mainnet);
let rpc = producer_handles.monero(ops).await;
let mut res = Vec::with_capacity(count);

View File

@@ -408,16 +408,11 @@ impl Coordinator {
use monero_wallet::{rpc::Rpc, address::Network, ViewPair};
let rpc = SimpleRequestRpc::new(rpc_url).await.expect("couldn't connect to the Monero RPC");
let _: EmptyResponse = rpc
.json_rpc_call(
"generateblocks",
Some(serde_json::json!({
"wallet_address": ViewPair::new(
ED25519_BASEPOINT_POINT,
Zeroizing::new(Scalar::ONE),
).legacy_address(Network::Mainnet).to_string(),
"amount_of_blocks": 1,
})),
rpc
.generate_blocks(
&ViewPair::new(ED25519_BASEPOINT_POINT, Zeroizing::new(Scalar::ONE))
.legacy_address(Network::Mainnet),
1,
)
.await
.unwrap();

View File

@@ -200,16 +200,7 @@ impl Wallet {
let height = rpc.get_height().await.unwrap();
// Mines 200 blocks so sufficient decoys exist, as only 60 is needed for maturity
let _: EmptyResponse = rpc
.json_rpc_call(
"generateblocks",
Some(serde_json::json!({
"wallet_address": view_pair.legacy_address(Network::Mainnet).to_string(),
"amount_of_blocks": 200,
})),
)
.await
.unwrap();
rpc.generate_blocks(&view_pair.legacy_address(Network::Mainnet), 200).await.unwrap();
let block = rpc.get_block(rpc.get_block_hash(height).await.unwrap()).await.unwrap();
Wallet::Monero {