From 35cebc16877c4cfbf48b883ab3bfa02b9100a87a Mon Sep 17 00:00:00 2001 From: psogv0308 Date: Mon, 4 Mar 2024 19:03:53 +0900 Subject: [PATCH] triedb/pathdb: changed the test code to check for verifying state (#29150) Co-authored-by: this-is-iron --- triedb/pathdb/database_test.go | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/triedb/pathdb/database_test.go b/triedb/pathdb/database_test.go index e7bd469993..df69942e9a 100644 --- a/triedb/pathdb/database_test.go +++ b/triedb/pathdb/database_test.go @@ -397,7 +397,11 @@ func TestDatabaseRollback(t *testing.T) { if err := tester.db.Recover(parent, loader); err != nil { t.Fatalf("Failed to revert db, err: %v", err) } - tester.verifyState(parent) + if i > 0 { + if err := tester.verifyState(parent); err != nil { + t.Fatalf("Failed to verify state, err: %v", err) + } + } } if tester.db.tree.len() != 1 { t.Fatal("Only disk layer is expected")