From 150b5b1a03e77ebee789d0a3b98804a89e218971 Mon Sep 17 00:00:00 2001 From: Gary Rong Date: Wed, 20 Sep 2023 21:06:39 +0800 Subject: [PATCH] trie: add missing tests --- trie/sync_test.go | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/trie/sync_test.go b/trie/sync_test.go index 840ffb8980..fe7321c913 100644 --- a/trie/sync_test.go +++ b/trie/sync_test.go @@ -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)