Skip to content

Commit 34ee5ab

Browse files
committed
Bloom expanded by 4
1 parent fa91096 commit 34ee5ab

1 file changed

Lines changed: 4 additions & 3 deletions

File tree

‎core/types/bloom9.go‎

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ func CreateBloom(receipts Receipts) []byte {
1414
bin.Or(bin, LogsBloom(receipt.logs))
1515
}
1616

17-
return ethutil.LeftPadBytes(bin.Bytes(), 64)
17+
return ethutil.LeftPadBytes(bin.Bytes(), 256)
1818
}
1919

2020
func LogsBloom(logs state.Logs) *big.Int {
@@ -37,9 +37,10 @@ func LogsBloom(logs state.Logs) *big.Int {
3737

3838
func bloom9(b []byte) *big.Int {
3939
r := new(big.Int)
40-
for _, i := range []int{0, 2, 4} {
40+
41+
for i := 0; i < 16; i += 2 {
4142
t := big.NewInt(1)
42-
b := uint(b[i+1]) + 256*(uint(b[i])&1)
43+
b := uint(b[i+1]) + 1024*(uint(b[i])&1)
4344
r.Or(r, t.Lsh(t, b))
4445
}
4546

0 commit comments

Comments
 (0)