mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-01-30 17:48:03 -05:00
fix(execution): extend poststate before threshold check (#2602)
This commit is contained in:
@@ -162,6 +162,10 @@ impl<EF: ExecutorFactory> ExecutionStage<EF> {
|
||||
.mgas_processed_total
|
||||
.increment(block.header.gas_used as f64 / MGAS_TO_GAS as f64);
|
||||
|
||||
// Merge state changes
|
||||
state.extend(block_state);
|
||||
progress = block_number;
|
||||
|
||||
// Write history periodically to free up memory
|
||||
if self.thresholds.should_write_history(state.changeset_size() as u64) {
|
||||
info!(target: "sync::stages::execution", ?block_number, "Writing history.");
|
||||
@@ -175,10 +179,6 @@ impl<EF: ExecutorFactory> ExecutionStage<EF> {
|
||||
info!(target: "sync::stages::execution", ?block_number, "Threshold hit, committing.");
|
||||
break
|
||||
}
|
||||
|
||||
// Merge state changes
|
||||
state.extend(block_state);
|
||||
progress = block_number;
|
||||
}
|
||||
|
||||
// Write remaining changes
|
||||
|
||||
Reference in New Issue
Block a user