From 71e63eca21e1d53f23b7b4a91a961b0e58050277 Mon Sep 17 00:00:00 2001 From: Jernej Kos Date: Sun, 12 Jan 2020 20:39:38 +0100 Subject: [PATCH] tests/clients/simple-keyvalue: Query up to latest round --- tests/clients/simple-keyvalue/src/main.rs | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) diff --git a/tests/clients/simple-keyvalue/src/main.rs b/tests/clients/simple-keyvalue/src/main.rs index f8423173065..d698cac95b6 100644 --- a/tests/clients/simple-keyvalue/src/main.rs +++ b/tests/clients/simple-keyvalue/src/main.rs @@ -150,12 +150,9 @@ fn main() { // Test wait_block_indexed call. println!("Waiting for block to be indexed..."); - rt.block_on( - kv_client - .txn_client() - .wait_block_indexed(latest_snapshot.block.header.round), - ) - .expect("wait block indexed"); + let latest_round = latest_snapshot.block.header.round; + rt.block_on(kv_client.txn_client().wait_block_indexed(latest_round)) + .expect("wait block indexed"); // Test get_block_by_hash call. println!( @@ -199,7 +196,7 @@ fn main() { println!("Querying transaction tags (kv_op=insert)..."); let query = Query { round_min: 0, - round_max: 3, + round_max: latest_round, conditions: vec![QueryCondition { key: b"kv_op".to_vec(), values: vec![b"insert".to_vec().into()],