core/txpool/blobpool: fix GetBlobs mark blob hash filled before checking sidecar version

This commit is contained in:
Weixie Cui 2026-05-06 13:23:26 +08:00
parent f0b21fa110
commit aa90166c38

View file

@ -1502,13 +1502,13 @@ func (p *BlobPool) GetBlobs(vhashes []common.Hash, version byte) ([]*kzg4844.Blo
if !ok {
continue // non-interesting blob
}
// Mark hash as seen.
filled[hash] = struct{}{}
if sidecar.Version != version {
// Skip blobs with incompatible version. Note we still track the blob hash
// in `filled` here, ensuring that we do not resolve this tx another time.
continue
}
// Mark hash as seen.
filled[hash] = struct{}{}
// Get or convert the proof.
var pf []kzg4844.Proof
switch version {