mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-19 02:12:23 +00:00
eth/catalyst: remove requests in GetPayloadBodies
This commit is contained in:
parent
0310778b86
commit
cb08ea9638
2 changed files with 2 additions and 20 deletions
|
|
@ -338,7 +338,6 @@ func BlockToExecutableData(block *types.Block, fees *big.Int, sidecars []*types.
|
||||||
type ExecutionPayloadBody struct {
|
type ExecutionPayloadBody struct {
|
||||||
TransactionData []hexutil.Bytes `json:"transactions"`
|
TransactionData []hexutil.Bytes `json:"transactions"`
|
||||||
Withdrawals []*types.Withdrawal `json:"withdrawals"`
|
Withdrawals []*types.Withdrawal `json:"withdrawals"`
|
||||||
Requests []hexutil.Bytes `json:"requests"`
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// Client identifiers to support ClientVersionV1.
|
// Client identifiers to support ClientVersionV1.
|
||||||
|
|
|
||||||
|
|
@ -1185,13 +1185,7 @@ func (api *ConsensusAPI) GetPayloadBodiesByHashV1(hashes []common.Hash) []*engin
|
||||||
bodies := make([]*engine.ExecutionPayloadBody, len(hashes))
|
bodies := make([]*engine.ExecutionPayloadBody, len(hashes))
|
||||||
for i, hash := range hashes {
|
for i, hash := range hashes {
|
||||||
block := api.eth.BlockChain().GetBlockByHash(hash)
|
block := api.eth.BlockChain().GetBlockByHash(hash)
|
||||||
body := getBody(block)
|
bodies[i] = getBody(block)
|
||||||
if body != nil {
|
|
||||||
// Nil out the V2 values, clients should know to not request V1 objects
|
|
||||||
// after Prague.
|
|
||||||
body.Requests = nil
|
|
||||||
}
|
|
||||||
bodies[i] = body
|
|
||||||
}
|
}
|
||||||
return bodies
|
return bodies
|
||||||
}
|
}
|
||||||
|
|
@ -1210,18 +1204,7 @@ func (api *ConsensusAPI) GetPayloadBodiesByHashV2(hashes []common.Hash) []*engin
|
||||||
// GetPayloadBodiesByRangeV1 implements engine_getPayloadBodiesByRangeV1 which allows for retrieval of a range
|
// GetPayloadBodiesByRangeV1 implements engine_getPayloadBodiesByRangeV1 which allows for retrieval of a range
|
||||||
// of block bodies by the engine api.
|
// of block bodies by the engine api.
|
||||||
func (api *ConsensusAPI) GetPayloadBodiesByRangeV1(start, count hexutil.Uint64) ([]*engine.ExecutionPayloadBody, error) {
|
func (api *ConsensusAPI) GetPayloadBodiesByRangeV1(start, count hexutil.Uint64) ([]*engine.ExecutionPayloadBody, error) {
|
||||||
bodies, err := api.getBodiesByRange(start, count)
|
return api.getBodiesByRange(start, count)
|
||||||
if err != nil {
|
|
||||||
return nil, err
|
|
||||||
}
|
|
||||||
// Nil out the V2 values, clients should know to not request V1 objects
|
|
||||||
// after Prague.
|
|
||||||
for i := range bodies {
|
|
||||||
if bodies[i] != nil {
|
|
||||||
bodies[i].Requests = nil
|
|
||||||
}
|
|
||||||
}
|
|
||||||
return bodies, nil
|
|
||||||
}
|
}
|
||||||
|
|
||||||
// GetPayloadBodiesByRangeV2 implements engine_getPayloadBodiesByRangeV1 which allows for retrieval of a range
|
// GetPayloadBodiesByRangeV2 implements engine_getPayloadBodiesByRangeV1 which allows for retrieval of a range
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue