@@ -224,21 +224,22 @@ type BlockBody struct {
224
224
Transactions []* types.Transaction // Transactions contained within a block
225
225
Uncles []* types.Header // Uncles contained within a block
226
226
Withdrawals []* types.Withdrawal `rlp:"optional"` // Withdrawals contained within a block
227
+ Requests []* types.Request `rlp:"optional"` // Requests contained within a block
227
228
}
228
229
229
230
// Unpack retrieves the transactions and uncles from the range packet and returns
230
231
// them in a split flat format that's more consistent with the internal data structures.
231
- func (p * BlockBodiesResponse ) Unpack () ([][]* types.Transaction , [][]* types.Header , [][]* types.Withdrawal ) {
232
- // TODO(matt): add support for withdrawals to fetchers
232
+ func (p * BlockBodiesResponse ) Unpack () ([][]* types.Transaction , [][]* types.Header , [][]* types.Withdrawal , [][]* types.Request ) {
233
233
var (
234
234
txset = make ([][]* types.Transaction , len (* p ))
235
235
uncleset = make ([][]* types.Header , len (* p ))
236
236
withdrawalset = make ([][]* types.Withdrawal , len (* p ))
237
+ requestset = make ([][]* types.Request , len (* p ))
237
238
)
238
239
for i , body := range * p {
239
- txset [i ], uncleset [i ], withdrawalset [i ] = body .Transactions , body .Uncles , body .Withdrawals
240
+ txset [i ], uncleset [i ], withdrawalset [i ], requestset [ i ] = body .Transactions , body .Uncles , body .Withdrawals , body . Requests
240
241
}
241
- return txset , uncleset , withdrawalset
242
+ return txset , uncleset , withdrawalset , requestset
242
243
}
243
244
244
245
// GetReceiptsRequest represents a block receipts query.
0 commit comments