Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 12 additions & 3 deletions crates/e2e-test-utils/src/testsuite/actions/produce_blocks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -590,12 +590,21 @@ where
// at least one client passes all the check, save the header in Env
if !accepted_check {
accepted_check = true;
// save the header in Env
env.active_node_state_mut()?.latest_header_time = next_new_payload.timestamp;
// save the current block info in Env
env.set_current_block_info(BlockInfo {
hash: rpc_latest_header.hash,
number: rpc_latest_header.inner.number,
timestamp: rpc_latest_header.inner.timestamp,
})?;
Comment thread
fgimenez marked this conversation as resolved.

// add it to header history
// align latest header time and forkchoice state with the accepted canonical
// head
env.active_node_state_mut()?.latest_header_time =
rpc_latest_header.inner.timestamp;
env.active_node_state_mut()?.latest_fork_choice_state.head_block_hash =
rpc_latest_header.hash;

// update local copy for any further usage in this scope
latest_block.hash = rpc_latest_header.hash;
latest_block.number = rpc_latest_header.inner.number;
}
Expand Down