aboutsummaryrefslogtreecommitdiffstats
path: root/core
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-03-03 18:56:12 +0800
committerobscuren <geffobscura@gmail.com>2015-03-03 18:56:12 +0800
commit34ee5ab9a8cfa67050a5bddc8eed4342b6409f59 (patch)
tree47f4a0d79d4e3dbdf24c74355bb6d4a26347540e /core
parentfa910966ede699f90b2760d7a11ac0ef5dbda029 (diff)
downloaddexon-34ee5ab9a8cfa67050a5bddc8eed4342b6409f59.tar
dexon-34ee5ab9a8cfa67050a5bddc8eed4342b6409f59.tar.gz
dexon-34ee5ab9a8cfa67050a5bddc8eed4342b6409f59.tar.bz2
dexon-34ee5ab9a8cfa67050a5bddc8eed4342b6409f59.tar.lz
dexon-34ee5ab9a8cfa67050a5bddc8eed4342b6409f59.tar.xz
dexon-34ee5ab9a8cfa67050a5bddc8eed4342b6409f59.tar.zst
dexon-34ee5ab9a8cfa67050a5bddc8eed4342b6409f59.zip
Bloom expanded by 4
Diffstat (limited to 'core')
-rw-r--r--core/types/bloom9.go7
1 files changed, 4 insertions, 3 deletions
diff --git a/core/types/bloom9.go b/core/types/bloom9.go
index c1841e553..578265a34 100644
--- a/core/types/bloom9.go
+++ b/core/types/bloom9.go
@@ -14,7 +14,7 @@ func CreateBloom(receipts Receipts) []byte {
bin.Or(bin, LogsBloom(receipt.logs))
}
- return ethutil.LeftPadBytes(bin.Bytes(), 64)
+ return ethutil.LeftPadBytes(bin.Bytes(), 256)
}
func LogsBloom(logs state.Logs) *big.Int {
@@ -37,9 +37,10 @@ func LogsBloom(logs state.Logs) *big.Int {
func bloom9(b []byte) *big.Int {
r := new(big.Int)
- for _, i := range []int{0, 2, 4} {
+
+ for i := 0; i < 16; i += 2 {
t := big.NewInt(1)
- b := uint(b[i+1]) + 256*(uint(b[i])&1)
+ b := uint(b[i+1]) + 1024*(uint(b[i])&1)
r.Or(r, t.Lsh(t, b))
}