Skip to content

Commit

Permalink
eth/fetcher: always use WithBody2 when constructing blocks
Browse files Browse the repository at this point in the history
  • Loading branch information
lightclient committed Nov 30, 2022
1 parent 97c2474 commit 256e54c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion eth/fetcher/block_fetcher.go
Original file line number Diff line number Diff line change
Expand Up @@ -687,7 +687,7 @@ func (f *BlockFetcher) loop() {
// Mark the body matched, reassemble if still unknown
matched = true
if f.getBlock(hash) == nil {
block := types.NewBlockWithHeader(announce.header).WithBody(task.transactions[i], task.uncles[i])
block := types.NewBlockWithHeader(announce.header).WithBody2(task.transactions[i], task.uncles[i], task.withdrawals[i])
block.ReceivedAt = task.time
blocks = append(blocks, block)
} else {
Expand All @@ -697,6 +697,7 @@ func (f *BlockFetcher) loop() {
if matched {
task.transactions = append(task.transactions[:i], task.transactions[i+1:]...)
task.uncles = append(task.uncles[:i], task.uncles[i+1:]...)
task.withdrawals = append(task.withdrawals[:i], task.withdrawals[i+1:]...)
i--
continue
}
Expand Down

0 comments on commit 256e54c

Please sign in to comment.