core/types: opt or using bitutil

This commit is contained in:
cuiweixie 2025-10-11 23:58:49 +08:00
parent 659342a523
commit 115db0d771
No known key found for this signature in database
GPG key ID: 16DF64EE15E495A3

View file

@ -21,6 +21,7 @@ import (
"fmt"
"math/big"
"github.com/ethereum/go-ethereum/common/bitutil"
"github.com/ethereum/go-ethereum/common/hexutil"
"github.com/ethereum/go-ethereum/crypto"
)
@ -125,9 +126,7 @@ func MergeBloom(receipts Receipts) Bloom {
for _, receipt := range receipts {
if len(receipt.Logs) != 0 {
bl := receipt.Bloom.Bytes()
for i := range bin {
bin[i] |= bl[i]
}
bitutil.ORBytes(bin[:], bin[:], bl)
}
}
return bin