mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-08 12:19:24 +00:00
* add vscode * fix for #166 & cleanup * remove unused self * fix issues on pr
This commit is contained in:
@@ -477,4 +477,21 @@ impl Rpc {
|
||||
|
||||
Ok(())
|
||||
}
|
||||
|
||||
pub async fn generate_blocks(&self, address: &str, block_count: usize) -> Result<(), RpcError> {
|
||||
self
|
||||
.rpc_call::<_, EmptyResponse>(
|
||||
"json_rpc",
|
||||
Some(json!({
|
||||
"method": "generateblocks",
|
||||
"params": {
|
||||
"wallet_address": address,
|
||||
"amount_of_blocks": block_count
|
||||
},
|
||||
})),
|
||||
)
|
||||
.await?;
|
||||
|
||||
Ok(())
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user