Skip to content

Commit 256e54c

Browse files
committed
eth/fetcher: always use WithBody2 when constructing blocks
1 parent 97c2474 commit 256e54c

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

eth/fetcher/block_fetcher.go

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -687,7 +687,7 @@ func (f *BlockFetcher) loop() {
687687
// Mark the body matched, reassemble if still unknown
688688
matched = true
689689
if f.getBlock(hash) == nil {
690-
block := types.NewBlockWithHeader(announce.header).WithBody(task.transactions[i], task.uncles[i])
690+
block := types.NewBlockWithHeader(announce.header).WithBody2(task.transactions[i], task.uncles[i], task.withdrawals[i])
691691
block.ReceivedAt = task.time
692692
blocks = append(blocks, block)
693693
} else {
@@ -697,6 +697,7 @@ func (f *BlockFetcher) loop() {
697697
if matched {
698698
task.transactions = append(task.transactions[:i], task.transactions[i+1:]...)
699699
task.uncles = append(task.uncles[:i], task.uncles[i+1:]...)
700+
task.withdrawals = append(task.withdrawals[:i], task.withdrawals[i+1:]...)
700701
i--
701702
continue
702703
}

0 commit comments

Comments
 (0)