Skip to content

Commit

Permalink
Don't delete the genesis state when split is 0x0!
Browse files Browse the repository at this point in the history
  • Loading branch information
michaelsproul committed May 14, 2024
1 parent aa8f7c1 commit 0f6ea4b
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion beacon_node/store/src/hot_cold_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2507,7 +2507,9 @@ impl<E: EthSpec, Hot: ItemStore<E>, Cold: ItemStore<E>> HotColdDB<E, Hot, Cold>

if summary.slot <= split.slot {
let old = summary.slot < split.slot;
let non_canonical = summary.slot == split.slot && state_root != split.state_root;
let non_canonical = summary.slot == split.slot
&& state_root != split.state_root
&& !split.state_root.is_zero();
if old || non_canonical {
let reason = if old {
"old dangling state"
Expand Down

0 comments on commit 0f6ea4b

Please sign in to comment.