-
Notifications
You must be signed in to change notification settings - Fork 53
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
84f0e6c
commit 3ddf1ee
Showing
2 changed files
with
12 additions
and
2 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
{ | ||
|
@@ -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!( | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters