Skip to content

Commit

Permalink
Test that timestamp increases
Browse files Browse the repository at this point in the history
  • Loading branch information
casey committed Nov 22, 2022
1 parent fb69f3c commit c25c380
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions src/subcommand/server.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1352,6 +1352,7 @@ next.*",

server.bitcoin_rpc_server.mine_blocks(1);

thread::sleep(Duration::from_millis(10));
server.index.update().unwrap();

assert_eq!(
Expand All @@ -1366,6 +1367,9 @@ next.*",
assert_eq!(info.transactions.len(), 2);
assert_eq!(info.transactions[0].starting_block_count, 0);
assert_eq!(info.transactions[1].starting_block_count, 1);
assert!(
info.transactions[1].starting_timestamp - info.transactions[0].starting_timestamp >= 10
);
}

#[test]
Expand Down

0 comments on commit c25c380

Please sign in to comment.