triedb/pathdb: changed the test code to check for verifying state (#29150)

Co-authored-by: this-is-iron <iron@superblock.co>
This commit is contained in:
psogv0308 2024-03-04 19:03:53 +09:00 committed by GitHub
parent 679a27a2b3
commit 35cebc1687
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

@ -397,7 +397,11 @@ func TestDatabaseRollback(t *testing.T) {
if err := tester.db.Recover(parent, loader); err != nil { if err := tester.db.Recover(parent, loader); err != nil {
t.Fatalf("Failed to revert db, err: %v", err) 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 { if tester.db.tree.len() != 1 {
t.Fatal("Only disk layer is expected") t.Fatal("Only disk layer is expected")