feat: return bank/block info with block-related results (#6716)

This commit is contained in:
Sunny Gleason
2019-11-12 14:49:41 -05:00
committed by GitHub
parent 2688ae614c
commit 5903339c17
10 changed files with 262 additions and 134 deletions

View File

@ -34,7 +34,11 @@ fn test_rpc_send_tx() {
.send()
.unwrap();
let json: Value = serde_json::from_str(&response.text().unwrap()).unwrap();
let blockhash: Hash = json["result"][0].as_str().unwrap().parse().unwrap();
let blockhash: Hash = json["result"]["value"][0]
.as_str()
.unwrap()
.parse()
.unwrap();
info!("blockhash: {:?}", blockhash);
let tx = system_transaction::transfer(&alice, &bob_pubkey, 20, blockhash);
@ -78,7 +82,7 @@ fn test_rpc_send_tx() {
let response_json_text = response.text().unwrap();
let json: Value = serde_json::from_str(&response_json_text).unwrap();
if true == json["result"] {
if true == json["result"]["value"] {
confirmed_tx = true;
break;
}