aboutsummaryrefslogtreecommitdiffstats
path: root/tests/vm
diff options
context:
space:
mode:
authorobscuren <geffobscura@gmail.com>2015-03-17 23:05:17 +0800
committerobscuren <geffobscura@gmail.com>2015-03-17 23:05:17 +0800
commitc21293cd91f5cd95a823065eb2345c840feec1a0 (patch)
tree2ba865d420834d4dff1b43d27350b49544e1456a /tests/vm
parent0fa7859b94ddb0a35a6fbdb2c29139b0baaa2bfa (diff)
downloaddexon-c21293cd91f5cd95a823065eb2345c840feec1a0.tar
dexon-c21293cd91f5cd95a823065eb2345c840feec1a0.tar.gz
dexon-c21293cd91f5cd95a823065eb2345c840feec1a0.tar.bz2
dexon-c21293cd91f5cd95a823065eb2345c840feec1a0.tar.lz
dexon-c21293cd91f5cd95a823065eb2345c840feec1a0.tar.xz
dexon-c21293cd91f5cd95a823065eb2345c840feec1a0.tar.zst
dexon-c21293cd91f5cd95a823065eb2345c840feec1a0.zip
bloom
Diffstat (limited to 'tests/vm')
-rw-r--r--tests/vm/gh_test.go25
1 files changed, 15 insertions, 10 deletions
diff --git a/tests/vm/gh_test.go b/tests/vm/gh_test.go
index f352e862d..bce34bb5d 100644
--- a/tests/vm/gh_test.go
+++ b/tests/vm/gh_test.go
@@ -2,11 +2,13 @@ package vm
import (
"bytes"
+ "fmt"
"math/big"
"strconv"
"testing"
"github.com/ethereum/go-ethereum/common"
+ "github.com/ethereum/go-ethereum/core/types"
"github.com/ethereum/go-ethereum/ethdb"
"github.com/ethereum/go-ethereum/logger"
"github.com/ethereum/go-ethereum/state"
@@ -80,6 +82,9 @@ func RunVmTest(p string, t *testing.T) {
helper.CreateFileTests(t, p, &tests)
for name, test := range tests {
+ if name != "log2_nonEmptyMem" {
+ continue
+ }
db, _ := ethdb.NewMemDatabase()
statedb := state.New(common.Hash{}, db)
for addr, account := range test.Pre {
@@ -167,16 +172,16 @@ func RunVmTest(p string, t *testing.T) {
if len(test.Logs) != len(logs) {
t.Errorf("log length mismatch. Expected %d, got %d", len(test.Logs), len(logs))
} else {
- /*
- fmt.Println("A", test.Logs)
- fmt.Println("B", logs)
- for i, log := range test.Logs {
- genBloom := common.LeftPadBytes(types.LogsBloom(state.Logs{logs[i]}).Bytes(), 256)
- if !bytes.Equal(genBloom, common.Hex2Bytes(log.BloomF)) {
- t.Errorf("bloom mismatch")
- }
- }
- */
+ fmt.Println("A", test.Logs)
+ fmt.Println("B", logs)
+ for i, log := range test.Logs {
+ genBloom := common.LeftPadBytes(types.LogsBloom(state.Logs{logs[i]}).Bytes(), 256)
+ fmt.Println("A BLOOM", log.BloomF)
+ fmt.Printf("B BLOOM %x\n", genBloom)
+ if !bytes.Equal(genBloom, common.Hex2Bytes(log.BloomF)) {
+ t.Errorf("'%s' bloom mismatch", name)
+ }
+ }
}
}
//statedb.Trie().PrintRoot()