eth/catalyst: fix getBlobsV3 partial/complete metrics

This commit is contained in:
Lessa 2026-04-05 08:34:22 -04:00 committed by GitHub
parent d8cb8a962b
commit 94ba237031
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -650,9 +650,16 @@ func (api *ConsensusAPI) getBlobs(hashes []common.Hash, v2 bool) ([]*engine.Blob
CellProofs: cellProofs,
}
}
if len(res) == len(hashes) {
nonNilCount := 0
for _, r := range res {
if r != nil {
nonNilCount++
}
}
if nonNilCount == len(hashes) {
getBlobsRequestCompleteHit.Inc(1)
} else if len(res) > 0 {
} else if nonNilCount > 0 {
getBlobsRequestPartialHit.Inc(1)
} else {
getBlobsRequestMiss.Inc(1)