Skip to content

Commit

Permalink
test/node: avoid creating new blocks when applying txs
Browse files Browse the repository at this point in the history
  • Loading branch information
tzemanovic committed Sep 5, 2024
1 parent f01cab2 commit e713446
Showing 1 changed file with 10 additions and 1 deletion.
11 changes: 10 additions & 1 deletion crates/node/src/shell/testing/node.rs
Original file line number Diff line number Diff line change
Expand Up @@ -604,11 +604,20 @@ impl MockNode {
}

// process proposal succeeded, now run finalize block

let time = {
#[allow(clippy::disallowed_methods)]
let time = DateTimeUtc::now();
// Set the block time in the past to avoid non-deterministically
// starting new epochs
let dur = namada_sdk::time::Duration::minutes(10);
time - dur
};
let req = FinalizeBlock {
header: BlockHeader {
hash: Hash([0; 32]),
#[allow(clippy::disallowed_methods)]
time: DateTimeUtc::now(),
time,
next_validators_hash: Hash([0; 32]),
},
block_hash: Hash([0; 32]),
Expand Down

0 comments on commit e713446

Please sign in to comment.