mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 02:12:23 +00:00
eth/protocols: remove Requests
This commit is contained in:
parent
7942a6b5ad
commit
ec1925be4c
2 changed files with 1 additions and 6 deletions
|
|
@ -316,7 +316,6 @@ func handleBlockBodies(backend Backend, msg Decoder, peer *Peer) error {
|
||||||
txsHashes = make([]common.Hash, len(res.BlockBodiesResponse))
|
txsHashes = make([]common.Hash, len(res.BlockBodiesResponse))
|
||||||
uncleHashes = make([]common.Hash, len(res.BlockBodiesResponse))
|
uncleHashes = make([]common.Hash, len(res.BlockBodiesResponse))
|
||||||
withdrawalHashes = make([]common.Hash, len(res.BlockBodiesResponse))
|
withdrawalHashes = make([]common.Hash, len(res.BlockBodiesResponse))
|
||||||
requestsHashes = make([]common.Hash, len(res.BlockBodiesResponse))
|
|
||||||
)
|
)
|
||||||
hasher := trie.NewStackTrie(nil)
|
hasher := trie.NewStackTrie(nil)
|
||||||
for i, body := range res.BlockBodiesResponse {
|
for i, body := range res.BlockBodiesResponse {
|
||||||
|
|
@ -325,11 +324,8 @@ func handleBlockBodies(backend Backend, msg Decoder, peer *Peer) error {
|
||||||
if body.Withdrawals != nil {
|
if body.Withdrawals != nil {
|
||||||
withdrawalHashes[i] = types.DeriveSha(types.Withdrawals(body.Withdrawals), hasher)
|
withdrawalHashes[i] = types.DeriveSha(types.Withdrawals(body.Withdrawals), hasher)
|
||||||
}
|
}
|
||||||
if body.Requests != nil {
|
|
||||||
requestsHashes[i] = types.CalcRequestsHash(body.Requests)
|
|
||||||
}
|
}
|
||||||
}
|
return [][]common.Hash{txsHashes, uncleHashes, withdrawalHashes}
|
||||||
return [][]common.Hash{txsHashes, uncleHashes, withdrawalHashes, requestsHashes}
|
|
||||||
}
|
}
|
||||||
return peer.dispatchResponse(&Response{
|
return peer.dispatchResponse(&Response{
|
||||||
id: res.RequestId,
|
id: res.RequestId,
|
||||||
|
|
|
||||||
|
|
@ -224,7 +224,6 @@ type BlockBody struct {
|
||||||
Transactions []*types.Transaction // Transactions contained within a block
|
Transactions []*types.Transaction // Transactions contained within a block
|
||||||
Uncles []*types.Header // Uncles contained within a block
|
Uncles []*types.Header // Uncles contained within a block
|
||||||
Withdrawals []*types.Withdrawal `rlp:"optional"` // Withdrawals contained within a block
|
Withdrawals []*types.Withdrawal `rlp:"optional"` // Withdrawals contained within a block
|
||||||
Requests [][]byte `rlp:"optional"` // Requests contained within a block
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Unpack retrieves the transactions and uncles from the range packet and returns
|
// Unpack retrieves the transactions and uncles from the range packet and returns
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue