Skip to content

Commit 8d3faf6

Browse files
committed
Build error fixes
1 parent baea8e8 commit 8d3faf6

File tree

3 files changed

+6
-7
lines changed

3 files changed

+6
-7
lines changed

build/test-global-coverage.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ for pkg in $(go list ./...); do
1616
# drop the namespace prefix.
1717
dir=${pkg##github.com/ethereum/go-ethereum/}
1818

19-
if [[ $dir != "tests/vm" ]]; then
19+
if [[ $dir != "tests" ]]; then
2020
go test -covermode=count -coverprofile=$dir/profile.tmp $pkg
2121
fi
2222
if [[ -f $dir/profile.tmp ]]; then

tests/state_test_util.go

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -121,17 +121,16 @@ func runStateTest(test VmTest) error {
121121
}
122122

123123
for addr, value := range account.Storage {
124-
v := obj.GetState(common.HexToHash(addr)).Bytes()
125-
vexp := common.FromHex(value)
124+
v := obj.GetState(common.HexToHash(addr))
125+
vexp := common.HexToHash(value)
126126

127-
if bytes.Compare(v, vexp) != 0 {
128-
return fmt.Errorf("(%x: %s) storage failed. Expected %x, got %x (%v %v)\n", obj.Address().Bytes()[0:4], addr, vexp, v, common.BigD(vexp), common.BigD(v))
127+
if v != vexp {
128+
return fmt.Errorf("(%x: %s) storage failed. Expected %x, got %x (%v %v)\n", obj.Address().Bytes()[0:4], addr, vexp, v, vexp.Big(), v.Big())
129129
}
130130
}
131131
}
132132

133133
statedb.Sync()
134-
//if !bytes.Equal(common.Hex2Bytes(test.PostStateRoot), statedb.Root()) {
135134
if common.HexToHash(test.PostStateRoot) != statedb.Root() {
136135
return fmt.Errorf("Post state root error. Expected %s, got %x", test.PostStateRoot, statedb.Root())
137136
}

tests/vm_test_util.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,7 @@ func runVmTest(test VmTest) error {
102102

103103
ret, logs, gas, err = RunVm(statedb, env, test.Exec)
104104

105-
// Compare expectedand actual return
105+
// Compare expected and actual return
106106
rexp := common.FromHex(test.Out)
107107
if bytes.Compare(rexp, ret) != 0 {
108108
return fmt.Errorf("return failed. Expected %x, got %x\n", rexp, ret)

0 commit comments

Comments
 (0)