Skip to content

Commit

Permalink
fixut: err should be returned by a seprated method ConflictsToMaindb(…
Browse files Browse the repository at this point in the history
…) when running conflict check cases
  • Loading branch information
andyzhang2023 committed Oct 25, 2024
1 parent 3fd45f3 commit 5ae6ffd
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion core/state/pevm_statedb_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2215,10 +2215,13 @@ func runConflictCase(prepare, txs1, txs2 Txs, checks []Check) error {
if err := txs2.Call(un2); err != nil {
return fmt.Errorf("failed to call txs2, err:%s", err.Error())
}
if err := un1.ConflictsToMaindb(); err != nil {
return fmt.Errorf("failed to check conflicts of un1, err:%s", err.Error())
}
if err := un1.Merge(true); err != nil {
return fmt.Errorf("failed to merge un1, err:%s", err.Error())
}
if err := un2.Merge(true); err == nil {
if err := un2.ConflictsToMaindb(); err == nil {
return fmt.Errorf("un2 merge is expected to be failed")
}
for _, c := range checks {
Expand Down

0 comments on commit 5ae6ffd

Please sign in to comment.