mirror of
https://github.com/darkrenaissance/darkfi.git
synced 2026-01-08 22:28:12 -05:00
rpc: Allow params as JSON object
This commit is contained in:
@@ -104,13 +104,13 @@ fn jsonrpc_reqrep() -> Result<()> {
|
||||
msleep(500).await;
|
||||
|
||||
let client = RpcClient::new(endpoint, executor.clone()).await?;
|
||||
let req = JsonRequest::new("ping", vec![]);
|
||||
let req = JsonRequest::new("ping", vec![].into());
|
||||
let rep = client.request(req).await?;
|
||||
|
||||
let rep = String::try_from(rep).unwrap();
|
||||
assert_eq!(&rep, "pong");
|
||||
|
||||
let req = JsonRequest::new("kill", vec![]);
|
||||
let req = JsonRequest::new("kill", vec![].into());
|
||||
let rep = client.request(req).await?;
|
||||
|
||||
let rep = String::try_from(rep).unwrap();
|
||||
|
||||
Reference in New Issue
Block a user