diff options
author | obscuren <geffobscura@gmail.com> | 2014-10-30 20:32:50 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-10-30 20:32:50 +0800 |
commit | df5603de0a34e80a1af6ad03e37ce43728baad35 (patch) | |
tree | 5d9a71ad887c243b781b1c2d6077336bed82057b /ethchain/bloom9.go | |
parent | fa890c8c0140dac1e02038a6134db0d83bb85af9 (diff) | |
download | dexon-df5603de0a34e80a1af6ad03e37ce43728baad35.tar dexon-df5603de0a34e80a1af6ad03e37ce43728baad35.tar.gz dexon-df5603de0a34e80a1af6ad03e37ce43728baad35.tar.bz2 dexon-df5603de0a34e80a1af6ad03e37ce43728baad35.tar.lz dexon-df5603de0a34e80a1af6ad03e37ce43728baad35.tar.xz dexon-df5603de0a34e80a1af6ad03e37ce43728baad35.tar.zst dexon-df5603de0a34e80a1af6ad03e37ce43728baad35.zip |
Moved logging to state, proper structured block
* Moved logs to state so it's subject to snapshotting
* Split up block header
* Removed logs from transactions and made them receipts only
Diffstat (limited to 'ethchain/bloom9.go')
-rw-r--r-- | ethchain/bloom9.go | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/ethchain/bloom9.go b/ethchain/bloom9.go index 4028231a3..8fa7b6339 100644 --- a/ethchain/bloom9.go +++ b/ethchain/bloom9.go @@ -3,21 +3,21 @@ package ethchain import ( "math/big" + "github.com/ethereum/go-ethereum/ethstate" "github.com/ethereum/go-ethereum/ethutil" - "github.com/ethereum/go-ethereum/vm" ) func CreateBloom(block *Block) []byte { bin := new(big.Int) bin.Or(bin, bloom9(block.Coinbase)) - for _, tx := range block.Transactions() { - bin.Or(bin, LogsBloom(tx.logs)) + for _, receipt := range block.Receipts() { + bin.Or(bin, LogsBloom(receipt.logs)) } return bin.Bytes() } -func LogsBloom(logs []vm.Log) *big.Int { +func LogsBloom(logs ethstate.Logs) *big.Int { bin := new(big.Int) for _, log := range logs { data := [][]byte{log.Address} |