From c318194528d04953e3fc8576845ad4dfe4e73fd5 Mon Sep 17 00:00:00 2001 From: Gary Rong Date: Tue, 23 Apr 2024 14:31:32 +0800 Subject: [PATCH] triedb/pathdb: fix flaky db tests --- triedb/pathdb/database.go | 1 + 1 file changed, 1 insertion(+) diff --git a/triedb/pathdb/database.go b/triedb/pathdb/database.go index 2e7c662804..18f2eeef00 100644 --- a/triedb/pathdb/database.go +++ b/triedb/pathdb/database.go @@ -293,6 +293,7 @@ func (db *Database) Enable(root common.Hash) error { // Ensure the provided state root matches the stored one. root = types.TrieRootHash(root) _, stored := rawdb.ReadAccountTrieNode(db.diskdb, nil) + stored = types.TrieRootHash(stored) if stored != root { return fmt.Errorf("state root mismatch: stored %x, synced %x", stored, root) }