Blob accounting fixes/tweaks (#5044)
- Replace asset by warning - change inequality to lt
This commit is contained in:
parent
7028cc45f5
commit
eda631cd7a
|
@ -70,7 +70,7 @@ func removeBlobs*(quarantine: var BlobQuarantine, digest: Eth2Digest) =
|
|||
func hasBlobs*(quarantine: BlobQuarantine, blck: deneb.SignedBeaconBlock):
|
||||
bool =
|
||||
let idxs = quarantine.blobIndices(blck.root)
|
||||
if len(blck.message.body.blob_kzg_commitments) != len(idxs):
|
||||
if len(blck.message.body.blob_kzg_commitments) < len(idxs):
|
||||
return false
|
||||
for i in 0..<len(idxs):
|
||||
if idxs[i] != uint64(i):
|
||||
|
|
|
@ -1362,7 +1362,11 @@ proc handleMissingBlobs(node: BeaconNode) =
|
|||
|
||||
if not node.blobQuarantine[].hasBlobs(blobless):
|
||||
let missing = node.blobQuarantine[].blobFetchRecord(blobless)
|
||||
doAssert not len(missing.indices) == 0
|
||||
if len(missing.indices) == 0:
|
||||
warn "quarantine missing blobs, but missing indices is empty",
|
||||
blk=blobless.root,
|
||||
indices=node.blobQuarantine[].blobIndices(blobless.root),
|
||||
kzgs=len(blobless.message.body.blob_kzg_commitments)
|
||||
fetches.add(missing)
|
||||
else:
|
||||
# this is a programming error should it occur.
|
||||
|
|
Loading…
Reference in New Issue