mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-07-23 05:06:43 +00:00
core/types: opt or using bitutil
This commit is contained in:
parent
659342a523
commit
115db0d771
1 changed files with 2 additions and 3 deletions
|
|
@ -21,6 +21,7 @@ import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"math/big"
|
"math/big"
|
||||||
|
|
||||||
|
"github.com/ethereum/go-ethereum/common/bitutil"
|
||||||
"github.com/ethereum/go-ethereum/common/hexutil"
|
"github.com/ethereum/go-ethereum/common/hexutil"
|
||||||
"github.com/ethereum/go-ethereum/crypto"
|
"github.com/ethereum/go-ethereum/crypto"
|
||||||
)
|
)
|
||||||
|
|
@ -125,9 +126,7 @@ func MergeBloom(receipts Receipts) Bloom {
|
||||||
for _, receipt := range receipts {
|
for _, receipt := range receipts {
|
||||||
if len(receipt.Logs) != 0 {
|
if len(receipt.Logs) != 0 {
|
||||||
bl := receipt.Bloom.Bytes()
|
bl := receipt.Bloom.Bytes()
|
||||||
for i := range bin {
|
bitutil.ORBytes(bin[:], bin[:], bl)
|
||||||
bin[i] |= bl[i]
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return bin
|
return bin
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue