Skip to content

Commit

Permalink
Remove remnants of requests from block body downloader (#12426)
Browse files Browse the repository at this point in the history
Block bodies no longer have requests after PR #12370
  • Loading branch information
yperbasis authored and somnathb1 committed Oct 24, 2024
1 parent 8b7aa87 commit ffd94c2
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
3 changes: 2 additions & 1 deletion turbo/stages/bodydownload/body_algos.go
Original file line number Diff line number Diff line change
Expand Up @@ -228,7 +228,8 @@ func (bd *BodyDownload) RequestSent(bodyReq *BodyRequest, timeWithTimeout uint64
}

// DeliverBodies takes the block body received from a peer and adds it to the various data structures
func (bd *BodyDownload) DeliverBodies(txs [][][]byte, uncles [][]*types.Header, withdrawals []types.Withdrawals, lenOfP2PMsg uint64, peerID [64]byte,
func (bd *BodyDownload) DeliverBodies(txs [][][]byte, uncles [][]*types.Header, withdrawals []types.Withdrawals,
lenOfP2PMsg uint64, peerID [64]byte,
) {
bd.deliveryCh <- Delivery{txs: txs, uncles: uncles, withdrawals: withdrawals, lenOfP2PMessage: lenOfP2PMsg, peerID: peerID}

Expand Down
5 changes: 2 additions & 3 deletions turbo/stages/bodydownload/body_data_struct.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,8 +12,8 @@ import (
"github.com/ledgerwatch/erigon/core/types"
)

// BodyHashes is to be used for the mapping between TxHash, UncleHash, WithdrawalsHash, and RequestRoot to the block header
type BodyHashes [4 * length.Hash]byte
// BodyHashes is to be used for the mapping between TxHash, UncleHash, and WithdrawalsHash to the block header
type BodyHashes [3 * length.Hash]byte

const MaxBodiesInRequest = 1024

Expand All @@ -22,7 +22,6 @@ type Delivery struct {
txs [][][]byte
uncles [][]*types.Header
withdrawals []types.Withdrawals
requests []types.FlatRequests
lenOfP2PMessage uint64
}

Expand Down

0 comments on commit ffd94c2

Please sign in to comment.