mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-22 15:59:26 +00:00
eth/catalyst: count actually-available blobs in getBlobs (#35028)
This commit is contained in:
parent
12eabbd76d
commit
a059a357d1
1 changed files with 6 additions and 1 deletions
|
|
@ -655,7 +655,12 @@ func (api *ConsensusAPI) getBlobs(ctx context.Context, hashes []common.Hash, v2
|
||||||
if len(hashes) > 128 {
|
if len(hashes) > 128 {
|
||||||
return nil, engine.TooLargeRequest.With(fmt.Errorf("requested blob count too large: %v", len(hashes)))
|
return nil, engine.TooLargeRequest.With(fmt.Errorf("requested blob count too large: %v", len(hashes)))
|
||||||
}
|
}
|
||||||
available := len(api.eth.BlobTxPool().AvailableBlobs(hashes))
|
available := 0
|
||||||
|
for _, ok := range api.eth.BlobTxPool().AvailableBlobs(hashes) {
|
||||||
|
if ok {
|
||||||
|
available++
|
||||||
|
}
|
||||||
|
}
|
||||||
getBlobsRequestedCounter.Inc(int64(len(hashes)))
|
getBlobsRequestedCounter.Inc(int64(len(hashes)))
|
||||||
getBlobsAvailableCounter.Inc(int64(available))
|
getBlobsAvailableCounter.Inc(int64(available))
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue