mirror of
https://github.com/darkrenaissance/darkfi.git
synced 2026-01-09 14:48:08 -05:00
chore: fixed broken darkfid rpc blockchain.get_block clients requests
This commit is contained in:
@@ -450,7 +450,7 @@ impl Drk {
|
||||
let params = self
|
||||
.darkfid_daemon_request(
|
||||
"blockchain.get_block",
|
||||
&JsonValue::Array(vec![JsonValue::String(height.to_string())]),
|
||||
&JsonValue::Array(vec![JsonValue::Number(height as f64)]),
|
||||
)
|
||||
.await?;
|
||||
let param = params.get::<String>().unwrap();
|
||||
|
||||
@@ -35,7 +35,7 @@ impl DarkfidRpcClient {
|
||||
let params = self
|
||||
.request(
|
||||
"blockchain.get_block",
|
||||
&JsonValue::Array(vec![JsonValue::String(height.to_string())]),
|
||||
&JsonValue::Array(vec![JsonValue::Number(height as f64)]),
|
||||
)
|
||||
.await?;
|
||||
let param = params.get::<String>().unwrap();
|
||||
|
||||
@@ -136,7 +136,7 @@ async fn realmain(args: Args, ex: Arc<smol::Executor<'static>>) -> Result<()> {
|
||||
info!(target: "blockchain-storage-metrics", "Requesting block for height: {h}");
|
||||
let req = JsonRequest::new(
|
||||
"blockchain.get_block",
|
||||
JsonValue::Array(vec![JsonValue::String(h.to_string())]),
|
||||
JsonValue::Array(vec![JsonValue::Number(h as f64)]),
|
||||
);
|
||||
let rep = rpc_client.request(req).await?;
|
||||
let encoded_block = rep.get::<String>().unwrap();
|
||||
|
||||
Reference in New Issue
Block a user