mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-01-24 05:22:03 +00:00
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):
|
func hasBlobs*(quarantine: BlobQuarantine, blck: deneb.SignedBeaconBlock):
|
||||||
bool =
|
bool =
|
||||||
let idxs = quarantine.blobIndices(blck.root)
|
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
|
return false
|
||||||
for i in 0..<len(idxs):
|
for i in 0..<len(idxs):
|
||||||
if idxs[i] != uint64(i):
|
if idxs[i] != uint64(i):
|
||||||
|
@ -1362,7 +1362,11 @@ proc handleMissingBlobs(node: BeaconNode) =
|
|||||||
|
|
||||||
if not node.blobQuarantine[].hasBlobs(blobless):
|
if not node.blobQuarantine[].hasBlobs(blobless):
|
||||||
let missing = node.blobQuarantine[].blobFetchRecord(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)
|
fetches.add(missing)
|
||||||
else:
|
else:
|
||||||
# this is a programming error should it occur.
|
# this is a programming error should it occur.
|
||||||
|
Loading…
x
Reference in New Issue
Block a user