Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Testing] Ignore #2009

Closed
wants to merge 1 commit into from
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions trie/triedb/pathdb/database_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -119,6 +119,7 @@ func newTester(t *testing.T, historyLimit uint64) *tester {
parent = obj.roots[len(obj.roots)-1]
}
root, nodes, states := obj.generate(parent)
fmt.Printf("newTester obj i:%d, root:%s \n", i, root.String())
if err := db.Update(root, parent, uint64(i), nodes, states); err != nil {
panic(fmt.Errorf("failed to update state changes, err: %w", err))
}
Expand Down Expand Up @@ -512,14 +513,17 @@ func TestJournal(t *testing.T) {
tester.db.Close()
tester.db = New(tester.db.diskdb, nil)

fmt.Printf("TestJournal tester.roots len:%d \n", len(tester.roots))
// Verify states including disk layer and all diff on top.
for i := 0; i < len(tester.roots); i++ {
if i >= tester.bottomIndex() {
fmt.Printf("TestJournal verifyState loop i:%d, bottomIndex:%d, verifyState:%s \n", i, tester.bottomIndex(), tester.roots[i])
if err := tester.verifyState(tester.roots[i]); err != nil {
t.Fatalf("Invalid state, err: %v", err)
}
continue
}
fmt.Printf("TestJournal verifyState loop i:%d, verifyState:%s \n", i, tester.roots[i])
if err := tester.verifyState(tester.roots[i]); err == nil {
t.Fatal("Unexpected state")
}
Expand Down