Fix no-std builds for monero-wallet
Some checks failed
Lint / clippy (ubuntu-latest) (push) Has been cancelled
Lint / clippy (windows-latest) (push) Has been cancelled
Lint / deny (push) Has been cancelled
Lint / fmt (push) Has been cancelled
Lint / machete (push) Has been cancelled
Lint / clippy (macos-13) (push) Has been cancelled
Lint / clippy (macos-14) (push) Has been cancelled
coins/ Tests / test-coins (push) Has been cancelled
Coordinator Tests / build (push) Has been cancelled
Full Stack Tests / build (push) Has been cancelled
Monero Tests / unit-tests (push) Has been cancelled
Monero Tests / integration-tests (v0.17.3.2) (push) Has been cancelled
Monero Tests / integration-tests (v0.18.2.0) (push) Has been cancelled
no-std build / build (push) Has been cancelled
Processor Tests / build (push) Has been cancelled
Tests / test-infra (push) Has been cancelled
Tests / test-substrate (push) Has been cancelled
Tests / test-serai-client (push) Has been cancelled

This commit is contained in:
Luke Parker 2024-07-09 02:17:57 -04:00
parent 84f0e6c26e
commit 3ddf1eec0c
No known key found for this signature in database
2 changed files with 12 additions and 2 deletions

View file

@ -62,6 +62,12 @@ async fn test_decoy_rpc() {
let rpc = let rpc =
SimpleRequestRpc::new("http://serai:seraidex@127.0.0.1:18081".to_string()).await.unwrap(); SimpleRequestRpc::new("http://serai:seraidex@127.0.0.1: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 // Test get_output_distribution
// It's documented to take two inclusive block numbers // It's documented to take two inclusive block numbers
{ {
@ -73,9 +79,13 @@ async fn test_decoy_rpc() {
rpc.get_output_distribution(0 .. distribution_len).await.unwrap().len(), rpc.get_output_distribution(0 .. distribution_len).await.unwrap().len(),
distribution_len distribution_len
); );
assert_eq!(
rpc.get_output_distribution(.. distribution_len).await.unwrap().len(),
distribution_len
);
assert_eq!( 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 distribution_len - 1
); );
assert_eq!( assert_eq!(

View file

@ -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}; use zeroize::{Zeroize, ZeroizeOnDrop};