Skip to content

Commit

Permalink
tests/clients/simple-keyvalue: Query up to latest round
Browse files Browse the repository at this point in the history
  • Loading branch information
kostko committed Jan 12, 2020
1 parent 5df3224 commit 71e63ec
Showing 1 changed file with 4 additions and 7 deletions.
11 changes: 4 additions & 7 deletions tests/clients/simple-keyvalue/src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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!(
Expand Down Expand Up @@ -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()],
Expand Down

0 comments on commit 71e63ec

Please sign in to comment.