Skip to content

Commit 5b393ac

Browse files
authored
eth/protocols/eth: remove Requests in block body (#30562)
Block no longer has Requests. This PR just removes some code that wasn't removed in #30425.
1 parent 58cf152 commit 5b393ac

File tree

3 files changed

+2
-8
lines changed

3 files changed

+2
-8
lines changed

eth/downloader/downloader_test.go

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -230,7 +230,6 @@ func (dlp *downloadTesterPeer) RequestBodies(hashes []common.Hash, sink chan *et
230230
txsHashes = make([]common.Hash, len(bodies))
231231
uncleHashes = make([]common.Hash, len(bodies))
232232
withdrawalHashes = make([]common.Hash, len(bodies))
233-
requestsHashes = make([]common.Hash, len(bodies))
234233
)
235234
hasher := trie.NewStackTrie(nil)
236235
for i, body := range bodies {
@@ -249,7 +248,7 @@ func (dlp *downloadTesterPeer) RequestBodies(hashes []common.Hash, sink chan *et
249248
res := &eth.Response{
250249
Req: req,
251250
Res: (*eth.BlockBodiesResponse)(&bodies),
252-
Meta: [][]common.Hash{txsHashes, uncleHashes, withdrawalHashes, requestsHashes},
251+
Meta: [][]common.Hash{txsHashes, uncleHashes, withdrawalHashes},
253252
Time: 1,
254253
Done: make(chan error, 1), // Ignore the returned status
255254
}

eth/protocols/eth/handlers.go

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -316,7 +316,6 @@ func handleBlockBodies(backend Backend, msg Decoder, peer *Peer) error {
316316
txsHashes = make([]common.Hash, len(res.BlockBodiesResponse))
317317
uncleHashes = make([]common.Hash, len(res.BlockBodiesResponse))
318318
withdrawalHashes = make([]common.Hash, len(res.BlockBodiesResponse))
319-
requestsHashes = make([]common.Hash, len(res.BlockBodiesResponse))
320319
)
321320
hasher := trie.NewStackTrie(nil)
322321
for i, body := range res.BlockBodiesResponse {
@@ -325,11 +324,8 @@ func handleBlockBodies(backend Backend, msg Decoder, peer *Peer) error {
325324
if body.Withdrawals != nil {
326325
withdrawalHashes[i] = types.DeriveSha(types.Withdrawals(body.Withdrawals), hasher)
327326
}
328-
if body.Requests != nil {
329-
requestsHashes[i] = types.CalcRequestsHash(body.Requests)
330-
}
331327
}
332-
return [][]common.Hash{txsHashes, uncleHashes, withdrawalHashes, requestsHashes}
328+
return [][]common.Hash{txsHashes, uncleHashes, withdrawalHashes}
333329
}
334330
return peer.dispatchResponse(&Response{
335331
id: res.RequestId,

eth/protocols/eth/protocol.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -224,7 +224,6 @@ type BlockBody struct {
224224
Transactions []*types.Transaction // Transactions contained within a block
225225
Uncles []*types.Header // Uncles contained within a block
226226
Withdrawals []*types.Withdrawal `rlp:"optional"` // Withdrawals contained within a block
227-
Requests [][]byte `rlp:"optional"` // Requests contained within a block
228227
}
229228

230229
// Unpack retrieves the transactions and uncles from the range packet and returns

0 commit comments

Comments
 (0)