aboutsummaryrefslogtreecommitdiffstats
path: root/ethchain/bloom9_test.go
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2014-10-30 03:16:18 +0800
committerobscuren <geffobscura@gmail.com>2014-10-30 03:16:18 +0800
commitcc67a84e945ba914d8e4981106d3c75c91c00db0 (patch)
treee409cf6b53a5a6308899958bb93f979c90b8c9de /ethchain/bloom9_test.go
parent81ec564ef61a6dcd06cfdd98a515d366aaac719f (diff)
downloadgo-tangerine-cc67a84e945ba914d8e4981106d3c75c91c00db0.tar
go-tangerine-cc67a84e945ba914d8e4981106d3c75c91c00db0.tar.gz
go-tangerine-cc67a84e945ba914d8e4981106d3c75c91c00db0.tar.bz2
go-tangerine-cc67a84e945ba914d8e4981106d3c75c91c00db0.tar.lz
go-tangerine-cc67a84e945ba914d8e4981106d3c75c91c00db0.tar.xz
go-tangerine-cc67a84e945ba914d8e4981106d3c75c91c00db0.tar.zst
go-tangerine-cc67a84e945ba914d8e4981106d3c75c91c00db0.zip
Added bloom 9 point lookup and bloom test
Diffstat (limited to 'ethchain/bloom9_test.go')
-rw-r--r--ethchain/bloom9_test.go17
1 files changed, 17 insertions, 0 deletions
diff --git a/ethchain/bloom9_test.go b/ethchain/bloom9_test.go
new file mode 100644
index 000000000..ab648b7fc
--- /dev/null
+++ b/ethchain/bloom9_test.go
@@ -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")
+ }
+}