serai/coins/monero/tests/rpc.rs

14 lines
340 B
Rust
Raw Normal View History

2022-04-29 00:41:43 +00:00
use serde_json::json;
use monero_serai::rpc::{EmptyResponse, RpcError, Rpc};
pub async fn mine_block(rpc: &Rpc, address: String) -> Result<EmptyResponse, RpcError> {
rpc.rpc_call("json_rpc", Some(json!({
"method": "generateblocks",
"params": {
"wallet_address": address,
"amount_of_blocks": 10
},
}))).await
}