diff options
Diffstat (limited to 'core/types/bloom9.go')
-rw-r--r-- | core/types/bloom9.go | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/core/types/bloom9.go b/core/types/bloom9.go index 55bfe2756..59b6c69c3 100644 --- a/core/types/bloom9.go +++ b/core/types/bloom9.go @@ -28,7 +28,7 @@ func LogsBloom(logs state.Logs) *big.Int { } for _, b := range data { - bin.Or(bin, common.BigD(bloom9(crypto.Sha3(b[:])).Bytes())) + bin.Or(bin, bloom9(crypto.Sha3(b[:]))) } } @@ -38,9 +38,10 @@ func LogsBloom(logs state.Logs) *big.Int { func bloom9(b []byte) *big.Int { r := new(big.Int) - for i := 0; i < 16; i += 2 { + for i := 0; i < 6; i += 2 { t := big.NewInt(1) - b := uint(b[i+1]) + 1024*(uint(b[i])&1) + //b := uint(b[i+1]) + 512*(uint(b[i])&1) + b := (uint(b[i+1]) + (uint(b[i]) << 8)) & 511 r.Or(r, t.Lsh(t, b)) } |