Skip to content

Commit

Permalink
Fix no-std builds for monero-wallet
Browse files Browse the repository at this point in the history
  • Loading branch information
kayabaNerve committed Jul 9, 2024
1 parent 84f0e6c commit 3ddf1ee
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 2 deletions.
12 changes: 11 additions & 1 deletion coins/monero/rpc/simple-request/tests/tests.rs
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,12 @@ async fn test_decoy_rpc() {
let rpc =
SimpleRequestRpc::new("http://serai:[email protected]:18081".to_string()).await.unwrap();

// Ensure there's blocks on-chain
rpc
.generate_blocks(&MoneroAddress::from_str(Network::Mainnet, ADDRESS).unwrap(), 100)
.await
.unwrap();

// Test get_output_distribution
// It's documented to take two inclusive block numbers
{
Expand All @@ -73,9 +79,13 @@ async fn test_decoy_rpc() {
rpc.get_output_distribution(0 .. distribution_len).await.unwrap().len(),
distribution_len
);
assert_eq!(
rpc.get_output_distribution(.. distribution_len).await.unwrap().len(),
distribution_len
);

assert_eq!(
rpc.get_output_distribution(0 .. (distribution_len - 1)).await.unwrap().len(),
rpc.get_output_distribution(.. (distribution_len - 1)).await.unwrap().len(),
distribution_len - 1
);
assert_eq!(
Expand Down
2 changes: 1 addition & 1 deletion coins/monero/wallet/src/decoys.rs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
use std_shims::{io, vec::Vec, collections::HashSet};
use std_shims::{io, vec::Vec, string::ToString, collections::HashSet};

use zeroize::{Zeroize, ZeroizeOnDrop};

Expand Down

0 comments on commit 3ddf1ee

Please sign in to comment.