mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-23 13:16:42 +00:00
core/txpool/blobpool: skip variable not needed
Signed-off-by: Csaba Kiraly <csaba.kiraly@gmail.com>
This commit is contained in:
parent
9e6c5c3683
commit
c75fdd947e
1 changed files with 5 additions and 10 deletions
|
|
@ -1379,15 +1379,12 @@ func (p *BlobPool) GetBlobs(vhashes []common.Hash, version byte, convert bool) (
|
||||||
}
|
}
|
||||||
// Traverse the blobs in the transaction
|
// Traverse the blobs in the transaction
|
||||||
for i, hash := range tx.BlobHashes() {
|
for i, hash := range tx.BlobHashes() {
|
||||||
skip := false // if true, skip using null, but proceed
|
|
||||||
list, ok := indices[hash]
|
list, ok := indices[hash]
|
||||||
if !ok {
|
if !ok {
|
||||||
continue // non-interesting blob
|
continue // non-interesting blob
|
||||||
}
|
}
|
||||||
var pf []kzg4844.Proof
|
var pf []kzg4844.Proof
|
||||||
if !convert && sidecar.Version != version {
|
if convert || sidecar.Version == version {
|
||||||
skip = true // blob sidecar version mismatch, skip but proceed
|
|
||||||
} else {
|
|
||||||
switch version {
|
switch version {
|
||||||
case types.BlobSidecarVersion0:
|
case types.BlobSidecarVersion0:
|
||||||
if sidecar.Version == types.BlobSidecarVersion0 {
|
if sidecar.Version == types.BlobSidecarVersion0 {
|
||||||
|
|
@ -1414,12 +1411,10 @@ func (p *BlobPool) GetBlobs(vhashes []common.Hash, version byte, convert bool) (
|
||||||
pf = cellProofs
|
pf = cellProofs
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if !skip {
|
for _, index := range list {
|
||||||
for _, index := range list {
|
blobs[index] = &sidecar.Blobs[i]
|
||||||
blobs[index] = &sidecar.Blobs[i]
|
commitments[index] = sidecar.Commitments[i]
|
||||||
commitments[index] = sidecar.Commitments[i]
|
proofs[index] = pf
|
||||||
proofs[index] = pf
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
filled[hash] = struct{}{}
|
filled[hash] = struct{}{}
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue