mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-05-24 16:59:26 +00:00
eth/catalyst: fix getBlobsV3 partial/complete metrics
This commit is contained in:
parent
d8cb8a962b
commit
94ba237031
1 changed files with 9 additions and 2 deletions
|
|
@ -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)
|
||||
|
|
|
|||
Loading…
Reference in a new issue