chore: fixed broken darkfid rpc blockchain.get_block clients requests

This commit is contained in:
skoupidi
2025-12-29 19:25:27 +02:00
parent ed4b505c8d
commit c9c9a7a38a
3 changed files with 3 additions and 3 deletions

View File

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

View File

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

View File

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