eth/downloader: fix empty-body case in queue fetchresult (#26707)

This commit is contained in:
Martin Holst Swende 2023-02-16 05:28:01 -05:00 committed by GitHub
parent 645e3e86c4
commit 13d7de77f4
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

@ -76,6 +76,8 @@ func newFetchResult(header *types.Header, fastSync bool) *fetchResult {
}
if !header.EmptyBody() {
item.pending |= (1 << bodyType)
} else if header.WithdrawalsHash != nil {
item.Withdrawals = make(types.Withdrawals, 0)
}
if fastSync && !header.EmptyReceipts() {
item.pending |= (1 << receiptType)