rename blockFork > consensusFork (#4731)

* rename `blockFork` > `consensusFork`

* revert one overzealous stateFork / blockFork rename
This commit is contained in:
Etan Kissling 2023-03-12 19:48:38 +01:00 committed by GitHub
parent bc74c35283
commit 29a699f69d
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 5 additions and 6 deletions

View File

@ -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)

View File

@ -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: