forked from cerc-io/plugeth
Build error fixes
This commit is contained in:
parent
baea8e87e5
commit
8d3faf69d0
@ -16,7 +16,7 @@ for pkg in $(go list ./...); do
|
|||||||
# drop the namespace prefix.
|
# drop the namespace prefix.
|
||||||
dir=${pkg##github.com/ethereum/go-ethereum/}
|
dir=${pkg##github.com/ethereum/go-ethereum/}
|
||||||
|
|
||||||
if [[ $dir != "tests/vm" ]]; then
|
if [[ $dir != "tests" ]]; then
|
||||||
go test -covermode=count -coverprofile=$dir/profile.tmp $pkg
|
go test -covermode=count -coverprofile=$dir/profile.tmp $pkg
|
||||||
fi
|
fi
|
||||||
if [[ -f $dir/profile.tmp ]]; then
|
if [[ -f $dir/profile.tmp ]]; then
|
||||||
|
@ -121,17 +121,16 @@ func runStateTest(test VmTest) error {
|
|||||||
}
|
}
|
||||||
|
|
||||||
for addr, value := range account.Storage {
|
for addr, value := range account.Storage {
|
||||||
v := obj.GetState(common.HexToHash(addr)).Bytes()
|
v := obj.GetState(common.HexToHash(addr))
|
||||||
vexp := common.FromHex(value)
|
vexp := common.HexToHash(value)
|
||||||
|
|
||||||
if bytes.Compare(v, vexp) != 0 {
|
if v != vexp {
|
||||||
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))
|
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())
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
statedb.Sync()
|
statedb.Sync()
|
||||||
//if !bytes.Equal(common.Hex2Bytes(test.PostStateRoot), statedb.Root()) {
|
|
||||||
if common.HexToHash(test.PostStateRoot) != statedb.Root() {
|
if common.HexToHash(test.PostStateRoot) != statedb.Root() {
|
||||||
return fmt.Errorf("Post state root error. Expected %s, got %x", test.PostStateRoot, statedb.Root())
|
return fmt.Errorf("Post state root error. Expected %s, got %x", test.PostStateRoot, statedb.Root())
|
||||||
}
|
}
|
||||||
|
@ -102,7 +102,7 @@ func runVmTest(test VmTest) error {
|
|||||||
|
|
||||||
ret, logs, gas, err = RunVm(statedb, env, test.Exec)
|
ret, logs, gas, err = RunVm(statedb, env, test.Exec)
|
||||||
|
|
||||||
// Compare expectedand actual return
|
// Compare expected and actual return
|
||||||
rexp := common.FromHex(test.Out)
|
rexp := common.FromHex(test.Out)
|
||||||
if bytes.Compare(rexp, ret) != 0 {
|
if bytes.Compare(rexp, ret) != 0 {
|
||||||
return fmt.Errorf("return failed. Expected %x, got %x\n", rexp, ret)
|
return fmt.Errorf("return failed. Expected %x, got %x\n", rexp, ret)
|
||||||
|
Loading…
Reference in New Issue
Block a user