mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-01-11 14:54:12 +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
|
# so as to "mostly" clean up the phase0 tables as well (which cannot be
|
||||||
# pruned easily by fork)
|
# pruned easily by fork)
|
||||||
|
|
||||||
let consensusFork = dag.cfg.consensusForkAtEpoch(tailSlot.epoch)
|
let stateFork = dag.cfg.consensusForkAtEpoch(tailSlot.epoch)
|
||||||
if consensusFork > ConsensusFork.Phase0:
|
if stateFork > ConsensusFork.Phase0:
|
||||||
for fork in ConsensusFork.Phase0..<consensusFork:
|
for fork in ConsensusFork.Phase0..<stateFork:
|
||||||
dag.db.clearStates(fork)
|
dag.db.clearStates(fork)
|
||||||
|
|
||||||
let blockFork = dag.cfg.consensusForkAtEpoch(blockHorizon.epoch)
|
let blockFork = dag.cfg.consensusForkAtEpoch(blockHorizon.epoch)
|
||||||
|
|
||||||
if blockFork > ConsensusFork.Phase0:
|
if blockFork > ConsensusFork.Phase0:
|
||||||
for fork in ConsensusFork.Phase0..<blockFork:
|
for fork in ConsensusFork.Phase0..<blockFork:
|
||||||
dag.db.clearBlocks(fork)
|
dag.db.clearBlocks(fork)
|
||||||
|
@ -2692,8 +2692,8 @@ proc decodeBody*(
|
|||||||
return err("Unexpected deserialization error")
|
return err("Unexpected deserialization error")
|
||||||
ok(data)
|
ok(data)
|
||||||
elif body.contentType == OctetStreamMediaType:
|
elif body.contentType == OctetStreamMediaType:
|
||||||
let blockFork = ? ConsensusFork.decodeString(version)
|
let consensusFork = ? ConsensusFork.decodeString(version)
|
||||||
case blockFork
|
case consensusFork
|
||||||
of ConsensusFork.Phase0:
|
of ConsensusFork.Phase0:
|
||||||
let blck =
|
let blck =
|
||||||
try:
|
try:
|
||||||
|
Loading…
x
Reference in New Issue
Block a user