diff options
author | Martin Holst Swende <martin@swende.se> | 2018-10-05 14:35:31 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-05 14:35:31 +0800 |
commit | 81375a3801564296a7ade3e7b5bde5fd63269d72 (patch) | |
tree | 8716172f560a5a35bb763a6fa2df07ce42dc6edc /tests/state_test_util.go | |
parent | d79602d2d4e23b1a8b3613684c17d23ad3c1abfa (diff) | |
download | go-tangerine-81375a3801564296a7ade3e7b5bde5fd63269d72.tar.gz go-tangerine-81375a3801564296a7ade3e7b5bde5fd63269d72.tar.zst go-tangerine-81375a3801564296a7ade3e7b5bde5fd63269d72.zip |
tests: do not exit early on log hash mismatch (#17844)
Diffstat (limited to 'tests/state_test_util.go')
-rw-r--r-- | tests/state_test_util.go | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/tests/state_test_util.go b/tests/state_test_util.go index 5d2251e52..3683aae32 100644 --- a/tests/state_test_util.go +++ b/tests/state_test_util.go @@ -143,9 +143,6 @@ func (t *StateTest) Run(subtest StateSubtest, vmconfig vm.Config) (*state.StateD if _, _, _, err := core.ApplyMessage(evm, msg, gaspool); err != nil { statedb.RevertToSnapshot(snapshot) } - if logs := rlpHash(statedb.Logs()); logs != common.Hash(post.Logs) { - return statedb, fmt.Errorf("post state logs hash mismatch: got %x, want %x", logs, post.Logs) - } // Commit block statedb.Commit(config.IsEIP158(block.Number())) // Add 0-value mining reward. This only makes a difference in the cases @@ -161,6 +158,9 @@ func (t *StateTest) Run(subtest StateSubtest, vmconfig vm.Config) (*state.StateD if root != common.Hash(post.Root) { return statedb, fmt.Errorf("post state root mismatch: got %x, want %x", root, post.Root) } + if logs := rlpHash(statedb.Logs()); logs != common.Hash(post.Logs) { + return statedb, fmt.Errorf("post state logs hash mismatch: got %x, want %x", logs, post.Logs) + } return statedb, nil } |