diff options
author | obscuren <geffobscura@gmail.com> | 2014-11-10 08:17:31 +0800 |
---|---|---|
committer | obscuren <geffobscura@gmail.com> | 2014-11-10 08:17:31 +0800 |
commit | cbeebcd47da846e1b8990313f1ff1ffe7d0bf00f (patch) | |
tree | 95db04f468e66ebb26afd81bc72abea8fbcf7c0e /chain/bloom9.go | |
parent | f538ea25e46d59dfa225ed105343d9c6a9909c2c (diff) | |
download | dexon-cbeebcd47da846e1b8990313f1ff1ffe7d0bf00f.tar dexon-cbeebcd47da846e1b8990313f1ff1ffe7d0bf00f.tar.gz dexon-cbeebcd47da846e1b8990313f1ff1ffe7d0bf00f.tar.bz2 dexon-cbeebcd47da846e1b8990313f1ff1ffe7d0bf00f.tar.lz dexon-cbeebcd47da846e1b8990313f1ff1ffe7d0bf00f.tar.xz dexon-cbeebcd47da846e1b8990313f1ff1ffe7d0bf00f.tar.zst dexon-cbeebcd47da846e1b8990313f1ff1ffe7d0bf00f.zip |
Fixed bloom, updated mining & block processing
* Reverted back to process blocks in batches method
* Bloom generation and lookup fix
* Minor UI changed (mainly debug)
Diffstat (limited to 'chain/bloom9.go')
-rw-r--r-- | chain/bloom9.go | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/chain/bloom9.go b/chain/bloom9.go index 2bbc9409d..4c029b56b 100644 --- a/chain/bloom9.go +++ b/chain/bloom9.go @@ -21,18 +21,18 @@ func CreateBloom(block *Block) []byte { func LogsBloom(logs state.Logs) *big.Int { bin := new(big.Int) for _, log := range logs { - data := [][]byte{crypto.Sha3(log.Address)} + data := [][]byte{log.Address} for _, topic := range log.Topics { data = append(data, topic) } - if log.Data != nil { - data = append(data, log.Data) - } - for _, b := range data { - bin.Or(bin, bloom9(b)) + bin.Or(bin, ethutil.BigD(bloom9(crypto.Sha3(b)).Bytes())) } + + //if log.Data != nil { + // data = append(data, log.Data) + //} } return bin @@ -51,7 +51,7 @@ func bloom9(b []byte) *big.Int { func BloomLookup(bin, topic []byte) bool { bloom := ethutil.BigD(bin) - cmp := bloom9(topic) + cmp := bloom9(crypto.Sha3(topic)) return bloom.And(bloom, cmp).Cmp(cmp) == 0 } |