core/txpool/blobpool: skip variable not needed

Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
This commit is contained in:
Csaba Kiraly 2025-09-19 10:21:11 +02:00
parent 9e6c5c3683
commit c75fdd947e
No known key found for this signature in database
GPG key ID: 0FE274EE8C95166E

View file

@ -1379,15 +1379,12 @@ func (p *BlobPool) GetBlobs(vhashes []common.Hash, version byte, convert bool) (
}
// Traverse the blobs in the transaction
for i, hash := range tx.BlobHashes() {
skip := false // if true, skip using null, but proceed
list, ok := indices[hash]
if !ok {
continue // non-interesting blob
}
var pf []kzg4844.Proof
if !convert && sidecar.Version != version {
skip = true // blob sidecar version mismatch, skip but proceed
} else {
if convert || sidecar.Version == version {
switch version {
case types.BlobSidecarVersion0:
if sidecar.Version == types.BlobSidecarVersion0 {
@ -1414,14 +1411,12 @@ func (p *BlobPool) GetBlobs(vhashes []common.Hash, version byte, convert bool) (
pf = cellProofs
}
}
if !skip {
for _, index := range list {
blobs[index] = &sidecar.Blobs[i]
commitments[index] = sidecar.Commitments[i]
proofs[index] = pf
}
}
}
filled[hash] = struct{}{}
}
}