aboutsummaryrefslogtreecommitdiffstats
path: root/ethchain/bloom9.go
diff options
context:
space:
mode:
Diffstat (limited to 'ethchain/bloom9.go')
-rw-r--r--ethchain/bloom9.go9
1 files changed, 4 insertions, 5 deletions
diff --git a/ethchain/bloom9.go b/ethchain/bloom9.go
index 742610169..508644b62 100644
--- a/ethchain/bloom9.go
+++ b/ethchain/bloom9.go
@@ -6,9 +6,10 @@ import (
"github.com/ethereum/go-ethereum/vm"
)
-func CreateBloom(txs Transactions) []byte {
+func CreateBloom(block *Block) []byte {
bin := new(big.Int)
- for _, tx := range txs {
+ bin.Or(bin, bloom9(block.Coinbase))
+ for _, tx := range block.Transactions() {
bin.Or(bin, LogsBloom(tx.logs))
}
@@ -36,9 +37,7 @@ func bloom9(b []byte) *big.Int {
r := new(big.Int)
for _, i := range []int{0, 2, 4} {
t := big.NewInt(1)
-
- //r |= 1 << (uint64(b[i+1]) + 256*(uint64(b[i])&1))
- r.Or(r, t.Rsh(t, uint(b[i+1])+256*(uint(b[i])&1)))
+ r.Or(r, t.Lsh(t, uint(b[i+1])+256*(uint(b[i])&1)))
}
return r