Skip to content

Commit 81375a3

Browse files
authored
tests: do not exit early on log hash mismatch (#17844)
1 parent d79602d commit 81375a3

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

‎tests/state_test_util.go‎

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -143,9 +143,6 @@ func (t *StateTest) Run(subtest StateSubtest, vmconfig vm.Config) (*state.StateD
143143
if _, _, _, err := core.ApplyMessage(evm, msg, gaspool); err != nil {
144144
statedb.RevertToSnapshot(snapshot)
145145
}
146-
if logs := rlpHash(statedb.Logs()); logs != common.Hash(post.Logs) {
147-
return statedb, fmt.Errorf("post state logs hash mismatch: got %x, want %x", logs, post.Logs)
148-
}
149146
// Commit block
150147
statedb.Commit(config.IsEIP158(block.Number()))
151148
// 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
161158
if root != common.Hash(post.Root) {
162159
return statedb, fmt.Errorf("post state root mismatch: got %x, want %x", root, post.Root)
163160
}
161+
if logs := rlpHash(statedb.Logs()); logs != common.Hash(post.Logs) {
162+
return statedb, fmt.Errorf("post state logs hash mismatch: got %x, want %x", logs, post.Logs)
163+
}
164164
return statedb, nil
165165
}
166166

0 commit comments

Comments
 (0)