bal-related fixes for the downloader

This commit is contained in:
Jared Wasinger 2026-01-06 17:35:42 +09:00
parent 8e028f3757
commit 8e8371056a

View file

@ -73,6 +73,7 @@ type fetchResult struct {
Transactions types.Transactions Transactions types.Transactions
Receipts rlp.RawValue Receipts rlp.RawValue
Withdrawals types.Withdrawals Withdrawals types.Withdrawals
AccessList *bal.BlockAccessList
} }
func newFetchResult(header *types.Header, snapSync bool) *fetchResult { func newFetchResult(header *types.Header, snapSync bool) *fetchResult {
@ -101,6 +102,7 @@ func (f *fetchResult) body() types.Body {
Transactions: f.Transactions, Transactions: f.Transactions,
Uncles: f.Uncles, Uncles: f.Uncles,
Withdrawals: f.Withdrawals, Withdrawals: f.Withdrawals,
AccessList: f.AccessList,
} }
} }
@ -599,7 +601,7 @@ func (q *queue) DeliverBodies(id string, txLists [][]*types.Transaction, txListH
if blockAccessLists[index] == nil { if blockAccessLists[index] == nil {
return errInvalidBody return errInvalidBody
} }
if accessListHashes[index] != header.Hash() { if accessListHashes[index] != *header.BlockAccessListHash {
return errInvalidBody return errInvalidBody
} }
} }
@ -641,6 +643,7 @@ func (q *queue) DeliverBodies(id string, txLists [][]*types.Transaction, txListH
result.Transactions = txLists[index] result.Transactions = txLists[index]
result.Uncles = uncleLists[index] result.Uncles = uncleLists[index]
result.Withdrawals = withdrawalLists[index] result.Withdrawals = withdrawalLists[index]
result.AccessList = blockAccessLists[index]
result.SetBodyDone() result.SetBodyDone()
} }
return q.deliver(id, q.blockTaskPool, q.blockTaskQueue, q.blockPendPool, return q.deliver(id, q.blockTaskPool, q.blockTaskQueue, q.blockPendPool,