Added bloom 9 point lookup and bloom test
This commit is contained in:
17
ethchain/bloom9_test.go
Normal file
17
ethchain/bloom9_test.go
Normal file
@@ -0,0 +1,17 @@
|
||||
package ethchain
|
||||
|
||||
import (
|
||||
"testing"
|
||||
|
||||
"github.com/ethereum/go-ethereum/vm"
|
||||
)
|
||||
|
||||
func TestBloom9(t *testing.T) {
|
||||
testCase := []byte("testtest")
|
||||
bin := LogsBloom([]vm.Log{vm.Log{testCase, nil, nil}}).Bytes()
|
||||
res := BloomLookup(bin, testCase)
|
||||
|
||||
if !res {
|
||||
t.Errorf("Bloom lookup failed")
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user