diff options
author | obscuren <geffobscura@gmail.com> | 2014-10-29 21:20:42 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-10-29 21:20:42 +0800 |
commit | 9e2f071d26d5c4ed343d2a91e48fec4e7751b99d (patch) | |
tree | fdfde82ceb0c6736b82c08c7002055ee95cfef67 /ethchain/bloom9.go | |
parent | fb4113dab4df8480c77bdcb707fa6b5408755b79 (diff) | |
download | dexon-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.go | 9 |
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 |