mirror of
https://github.com/paradigmxyz/reth.git
synced 2026-01-29 00:58:11 -05:00
bug: Increment transition_id if block changeset is present (#1718)
This commit is contained in:
@@ -719,6 +719,8 @@ where
|
||||
current_transition_id += 1;
|
||||
}
|
||||
|
||||
let have_block_changeset = !results.block_changesets.is_empty();
|
||||
|
||||
// If there are any post block changes, we will add account changesets to db.
|
||||
for (address, changeset) in results.block_changesets.into_iter() {
|
||||
trace!(target: "sync::stages::execution", ?address, current_transition_id, "Applying block reward");
|
||||
@@ -729,7 +731,13 @@ where
|
||||
spurious_dragon_active,
|
||||
)?;
|
||||
}
|
||||
current_transition_id += 1;
|
||||
|
||||
// Transition is incremeneted every time before Paris hardfork and after
|
||||
// Shanghai only if there are Withdrawals in the block. So it is correct to
|
||||
// to increment transition id every time there is a block changeset present.
|
||||
if have_block_changeset {
|
||||
current_transition_id += 1;
|
||||
}
|
||||
}
|
||||
Ok(())
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user