aboutsummaryrefslogtreecommitdiffstats
path: root/ethchain/bloom9.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-10-29 21:20:42 +0800
committerobscuren <geffobscura@gmail.com>2014-10-29 21:20:42 +0800
commit9e2f071d26d5c4ed343d2a91e48fec4e7751b99d (patch)
treefdfde82ceb0c6736b82c08c7002055ee95cfef67 /ethchain/bloom9.go
parentfb4113dab4df8480c77bdcb707fa6b5408755b79 (diff)
downloaddexon-9e2f071d26d5c4ed343d2a91e48fec4e7751b99d.tar
dexon-9e2f071d26d5c4ed343d2a91e48fec4e7751b99d.tar.gz
dexon-9e2f071d26d5c4ed343d2a91e48fec4e7751b99d.tar.bz2
dexon-9e2f071d26d5c4ed343d2a91e48fec4e7751b99d.tar.lz
dexon-9e2f071d26d5c4ed343d2a91e48fec4e7751b99d.tar.xz
dexon-9e2f071d26d5c4ed343d2a91e48fec4e7751b99d.tar.zst
dexon-9e2f071d26d5c4ed343d2a91e48fec4e7751b99d.zip
Removed events from the state manager
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