fix for #166 & cleanup (#184)

* add vscode

* fix for #166 & cleanup

* remove unused self

* fix issues on pr
This commit is contained in:
akildemir
2022-12-07 18:08:04 +03:00
committed by GitHub
parent 7d3a06ac05
commit ba157ea84b
4 changed files with 58 additions and 38 deletions

View File

@@ -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(())
}
}