trie: add missing tests

This commit is contained in:
Gary Rong 2023-09-20 21:06:39 +08:00
parent 827456711a
commit 150b5b1a03

View file

@ -732,6 +732,13 @@ func syncWith(t *testing.T, root common.Hash, db ethdb.Database, srcDb *Database
}
}
// Tests that the syncing target is keeping moving which may overwrite the stale
// states synced in the last cycle.
func TestSyncMovingTarget(t *testing.T) {
testSyncMovingTarget(t, rawdb.HashScheme)
testSyncMovingTarget(t, rawdb.PathScheme)
}
func testSyncMovingTarget(t *testing.T, scheme string) {
// Create a random trie to copy
_, srcDb, srcTrie, srcData := makeTestTrie(scheme)