mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-02-26 15:47:21 +00:00
fix test
Signed-off-by: jsvisa <delweng@gmail.com>
This commit is contained in:
parent
0a37daf8d3
commit
9db49bdd7f
1 changed files with 4 additions and 3 deletions
|
|
@ -738,7 +738,7 @@ func testSyncProgress(t *testing.T, protocol uint, mode SyncMode) {
|
|||
// TestSkeletonResetAfterSetHead tests that the skeleton syncer is properly reset
|
||||
// when the chain is rewound using SetHead, preventing data inconsistency issues.
|
||||
func TestSkeletonResetAfterSetHead(t *testing.T) {
|
||||
tester := newTester(t)
|
||||
tester := newTester(t, ethconfig.SnapSync)
|
||||
defer tester.terminate()
|
||||
|
||||
chain := testChainBase.shorten(800)
|
||||
|
|
@ -749,7 +749,8 @@ func TestSkeletonResetAfterSetHead(t *testing.T) {
|
|||
}
|
||||
|
||||
// Start beacon sync to populate the skeleton
|
||||
if err := tester.downloader.BeaconSync(SnapSync, chain.blocks[len(chain.blocks)-1].Header(), nil); err != nil {
|
||||
header := chain.blocks[400].Header()
|
||||
if err := tester.downloader.BeaconSync(header, header); err != nil {
|
||||
t.Fatalf("Failed to start beacon sync: %v", err)
|
||||
}
|
||||
|
||||
|
|
@ -772,7 +773,7 @@ func TestSkeletonResetAfterSetHead(t *testing.T) {
|
|||
}
|
||||
|
||||
// Verify we can start a new sync after reset
|
||||
if err := tester.downloader.BeaconSync(SnapSync, chain.blocks[400].Header(), nil); err != nil {
|
||||
if err := tester.downloader.BeaconSync(header, header); err != nil {
|
||||
t.Fatalf("Failed to start beacon sync after reset: %v", err)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue