Skip to content

Commit

Permalink
Revert some all the changes.
Browse files Browse the repository at this point in the history
  • Loading branch information
cheatfate committed Jan 10, 2025
1 parent 35f6598 commit c3ec4a0
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 5 deletions.
2 changes: 1 addition & 1 deletion beacon_chain/consensus_object_pools/block_clearance.nim
Original file line number Diff line number Diff line change
Expand Up @@ -514,7 +514,7 @@ proc addBackfillBlockData*(
# 100%, but its not enough.

if not updateState(dag, dag.clearanceState, clearanceBlock, true, cache,
dag.updateFlags):
updateFlags1):
error "Unable to load clearance state for parent block, " &
"database corrupt?", clearanceBlock = shortLog(clearanceBlock)
return err(VerifierError.MissingParent)
Expand Down
3 changes: 1 addition & 2 deletions beacon_chain/consensus_object_pools/blockchain_dag.nim
Original file line number Diff line number Diff line change
Expand Up @@ -950,8 +950,7 @@ proc advanceSlots*(

process_slots(
dag.cfg, state, getStateField(state, slot) + 1, cache, info,
updateFlags).
expect("process_slots shouldn't fail when state slot is correct")
updateFlags).expect("process_slots shouldn't fail when state slot is correct")

if save:
dag.putState(state, stateBid)
Expand Down
4 changes: 2 additions & 2 deletions beacon_chain/spec/state_transition.nim
Original file line number Diff line number Diff line change
Expand Up @@ -257,8 +257,8 @@ func maybeUpgradeState*(

proc process_slots*(
cfg: RuntimeConfig, state: var ForkedHashedBeaconState, slot: Slot,
cache: var StateCache, info: var ForkedEpochInfo, flags: UpdateFlags
): Result[void, cstring] =
cache: var StateCache, info: var ForkedEpochInfo, flags: UpdateFlags):
Result[void, cstring] =
if not (getStateField(state, slot) < slot):
if slotProcessed notin flags or getStateField(state, slot) != slot:
return err("process_slots: cannot rewind state to past slot")
Expand Down

0 comments on commit c3ec4a0

Please sign in to comment.