mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-02-20 02:08:12 +00:00
prevent resyncing from genesis with altair head block (#2750)
This commit is contained in:
parent
e576064788
commit
a2c1b96ac9
@ -1124,10 +1124,12 @@ proc isInitialized*(T: type ChainDAGRef, db: BeaconChainDB): bool =
|
|||||||
return false
|
return false
|
||||||
|
|
||||||
let
|
let
|
||||||
headBlock = db.getBlock(headBlockRoot.get())
|
headBlockPhase0 = db.getBlock(headBlockRoot.get())
|
||||||
|
headBlockAltair = db.getAltairBlock(headBlockRoot.get())
|
||||||
tailBlock = db.getBlock(tailBlockRoot.get())
|
tailBlock = db.getBlock(tailBlockRoot.get())
|
||||||
|
|
||||||
if not (headBlock.isSome() and tailBlock.isSome()):
|
if not ((headBlockPhase0.isSome() or headBlockAltair.isSome()) and
|
||||||
|
tailBlock.isSome()):
|
||||||
return false
|
return false
|
||||||
|
|
||||||
if not db.containsState(tailBlock.get().message.state_root):
|
if not db.containsState(tailBlock.get().message.state_root):
|
||||||
|
Loading…
x
Reference in New Issue
Block a user