remove unused `getExistingForkedBlock` overload (#3742)

Removes an unused overload of a local LC data function.
This commit is contained in:
Etan Kissling 2022-06-14 10:19:11 +02:00 committed by GitHub
parent 0cedb1b6a7
commit e3f0d2ecbc
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 2 additions and 11 deletions

View File

@ -34,7 +34,7 @@ template nextEpochBoundarySlot(slot: Slot): Slot =
## referring to a block at given slot. ## referring to a block at given slot.
(slot + (SLOTS_PER_EPOCH - 1)).epoch.start_slot (slot + (SLOTS_PER_EPOCH - 1)).epoch.start_slot
func computeEarliestLightClientSlot*(dag: ChainDAGRef): Slot = func computeEarliestLightClientSlot(dag: ChainDAGRef): Slot =
## Compute the earliest slot for which light client data is retained. ## Compute the earliest slot for which light client data is retained.
let let
minSupportedSlot = max( minSupportedSlot = max(
@ -95,16 +95,7 @@ proc existingParent(dag: ChainDAGRef, bid: BlockId): Opt[BlockId] =
doAssert verifyFinalization notin dag.updateFlags doAssert verifyFinalization notin dag.updateFlags
parent parent
proc getExistingForkedBlock(dag: ChainDAGRef, root: Eth2Digest): proc getExistingForkedBlock(
Opt[ForkedTrustedSignedBeaconBlock] =
## Wrapper around `getForkedBlock` for blocks expected to exist.
let bdata = dag.getForkedBlock(root)
if bdata.isErr:
error "Block failed to load unexpectedly", root, tail = dag.tail.slot
doAssert verifyFinalization notin dag.updateFlags
bdata
proc getExistingForkedBlock*(
dag: ChainDAGRef, bid: BlockId): Opt[ForkedTrustedSignedBeaconBlock] = dag: ChainDAGRef, bid: BlockId): Opt[ForkedTrustedSignedBeaconBlock] =
## Wrapper around `getForkedBlock` for blocks expected to exist. ## Wrapper around `getForkedBlock` for blocks expected to exist.
let bdata = dag.getForkedBlock(bid) let bdata = dag.getForkedBlock(bid)