lear missing on orphan add in quarantine (#1441)
This commit is contained in:
parent
70df0ad057
commit
ac78e75bf8
|
@ -41,12 +41,14 @@ func checkMissing*(quarantine: var QuarantineRef): seq[FetchRecord] =
|
|||
result.add(FetchRecord(root: k))
|
||||
|
||||
func addMissing*(quarantine: var QuarantineRef, broot: Eth2Digest) {.inline.} =
|
||||
discard quarantine.missing.hasKeyOrPut(broot, MissingBlock())
|
||||
if broot notin quarantine.orphans:
|
||||
discard quarantine.missing.hasKeyOrPut(broot, MissingBlock())
|
||||
|
||||
func add*(quarantine: var QuarantineRef, dag: ChainDAGRef,
|
||||
sblck: SignedBeaconBlock) =
|
||||
## Adds block to quarantine's `orphans` and `missing` lists.
|
||||
quarantine.orphans[sblck.root] = sblck
|
||||
quarantine.missing.del(sblck.root)
|
||||
|
||||
let parentRoot = sblck.message.parent_root
|
||||
if parentRoot notin quarantine.orphans:
|
||||
|
|
Loading…
Reference in New Issue