From 6ad8572e0a7c82731edc8ebdaad10fea6ab63cb8 Mon Sep 17 00:00:00 2001 From: jonny rhea <5555162+jrhea@users.noreply.github.com> Date: Thu, 16 Jul 2026 11:27:30 -0500 Subject: [PATCH] fix test after rebase --- eth/protocols/snap/syncv2_test.go | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) diff --git a/eth/protocols/snap/syncv2_test.go b/eth/protocols/snap/syncv2_test.go index b0494efb52..96f8913d56 100644 --- a/eth/protocols/snap/syncv2_test.go +++ b/eth/protocols/snap/syncv2_test.go @@ -2222,6 +2222,9 @@ func seedCompletedSync(t *testing.T, scheme string) *reenableFixture { hashX := crypto.Keccak256Hash(addrX[:]) bals := make(map[common.Hash]rlp.RawValue) + // Link the parent hashes down from the pivot, the catch-up walks the + // chain backward from the target header. + parent := pivotA.Hash() mkBALHeader := func(num uint64, root common.Hash, balance uint64) *types.Header { cb := bal.NewConstructionBlockAccessList() cb.BalanceChange(0, addrY, uint256.NewInt(balance)) @@ -2234,7 +2237,16 @@ func seedCompletedSync(t *testing.T, scheme string) *reenableFixture { t.Fatal(err) } balHash := b.Hash() - header := mkHeader(num, root, &balHash) + header := &types.Header{ + Number: new(big.Int).SetUint64(num), ParentHash: parent, Root: root, + Difficulty: common.Big0, BaseFee: common.Big0, WithdrawalsHash: &emptyHash, + BlobGasUsed: &zero, ExcessBlobGas: &zero, + ParentBeaconRoot: &emptyHash, RequestsHash: &emptyHash, + BlockAccessListHash: &balHash, + } + rawdb.WriteHeader(db, header) + rawdb.WriteCanonicalHash(db, header.Hash(), num) + parent = header.Hash() bals[header.Hash()] = buf.Bytes() return header }