mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-01-11 06:46:10 +00:00
rename blockFork
> consensusFork
(#4731)
* rename `blockFork` > `consensusFork` * revert one overzealous stateFork / blockFork rename
This commit is contained in:
parent
bc74c35283
commit
29a699f69d
@ -1954,13 +1954,12 @@ proc pruneHistory*(dag: ChainDAGRef, startup = false) =
|
||||
# so as to "mostly" clean up the phase0 tables as well (which cannot be
|
||||
# pruned easily by fork)
|
||||
|
||||
let consensusFork = dag.cfg.consensusForkAtEpoch(tailSlot.epoch)
|
||||
if consensusFork > ConsensusFork.Phase0:
|
||||
for fork in ConsensusFork.Phase0..<consensusFork:
|
||||
let stateFork = dag.cfg.consensusForkAtEpoch(tailSlot.epoch)
|
||||
if stateFork > ConsensusFork.Phase0:
|
||||
for fork in ConsensusFork.Phase0..<stateFork:
|
||||
dag.db.clearStates(fork)
|
||||
|
||||
let blockFork = dag.cfg.consensusForkAtEpoch(blockHorizon.epoch)
|
||||
|
||||
if blockFork > ConsensusFork.Phase0:
|
||||
for fork in ConsensusFork.Phase0..<blockFork:
|
||||
dag.db.clearBlocks(fork)
|
||||
|
@ -2692,8 +2692,8 @@ proc decodeBody*(
|
||||
return err("Unexpected deserialization error")
|
||||
ok(data)
|
||||
elif body.contentType == OctetStreamMediaType:
|
||||
let blockFork = ? ConsensusFork.decodeString(version)
|
||||
case blockFork
|
||||
let consensusFork = ? ConsensusFork.decodeString(version)
|
||||
case consensusFork
|
||||
of ConsensusFork.Phase0:
|
||||
let blck =
|
||||
try:
|
||||
|
Loading…
x
Reference in New Issue
Block a user