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))
|
result.add(FetchRecord(root: k))
|
||||||
|
|
||||||
func addMissing*(quarantine: var QuarantineRef, broot: Eth2Digest) {.inline.} =
|
func addMissing*(quarantine: var QuarantineRef, broot: Eth2Digest) {.inline.} =
|
||||||
|
if broot notin quarantine.orphans:
|
||||||
discard quarantine.missing.hasKeyOrPut(broot, MissingBlock())
|
discard quarantine.missing.hasKeyOrPut(broot, MissingBlock())
|
||||||
|
|
||||||
func add*(quarantine: var QuarantineRef, dag: ChainDAGRef,
|
func add*(quarantine: var QuarantineRef, dag: ChainDAGRef,
|
||||||
sblck: SignedBeaconBlock) =
|
sblck: SignedBeaconBlock) =
|
||||||
## Adds block to quarantine's `orphans` and `missing` lists.
|
## Adds block to quarantine's `orphans` and `missing` lists.
|
||||||
quarantine.orphans[sblck.root] = sblck
|
quarantine.orphans[sblck.root] = sblck
|
||||||
|
quarantine.missing.del(sblck.root)
|
||||||
|
|
||||||
let parentRoot = sblck.message.parent_root
|
let parentRoot = sblck.message.parent_root
|
||||||
if parentRoot notin quarantine.orphans:
|
if parentRoot notin quarantine.orphans:
|
||||||
|
|
Loading…
Reference in New Issue