Skip to content

Commit

Permalink
Clear some obsolete or wrong asserts
Browse files Browse the repository at this point in the history
why
  It is wrong to depend on a particular state of other modules (e.g.
  `FC` module) unless they are fully controlled by this one.
  • Loading branch information
mjfh committed Mar 10, 2025
1 parent e2ae3fb commit a946773
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 6 deletions.
1 change: 0 additions & 1 deletion execution_chain/sync/beacon/worker/blocks_staged.nim
Original file line number Diff line number Diff line change
Expand Up @@ -363,7 +363,6 @@ proc blocksStagedImport*(
finHash = if nBn < ctx.layout.final: nthHash
else: ctx.layout.finalHash

doAssert nBn == ctx.chain.latestNumber()
ctx.pool.chain.forkChoice(nthHash, finHash).isOkOr:
ctx.poolMode = true
warn info & ": fork choice error (reorg triggered)", n, iv,
Expand Down
5 changes: 0 additions & 5 deletions execution_chain/sync/beacon/worker/headers_staged.nim
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,6 @@ proc headersStagedCollect*(

# End block: `fetchHeadersBody`

# The cache `antecedent` must match variable `D` (aka dangling)
doAssert ctx.hdrCache.fcHeaderAntecedent().number <= ctx.layout.dangling

let nHeaders = nDeterministic + nOpportunistic.uint64
if nHeaders == 0:
return false
Expand Down Expand Up @@ -149,8 +146,6 @@ proc headersStagedProcess*(buddy: BeaconBuddyRef; info: static[string]) =
let qItem = ctx.hdr.staged.le(high BlockNumber).valueOr:
break # all done

doAssert qItem.key == qItem.data.revHdrs[0].number

let
minNum = qItem.data.revHdrs[^1].number
maxNum = qItem.data.revHdrs[0].number
Expand Down

0 comments on commit a946773

Please sign in to comment.