From 2fecac60414e5d3593b04680d252ae3bdd04c60a Mon Sep 17 00:00:00 2001 From: Marius van der Wijden Date: Fri, 27 Jan 2023 12:03:03 +0100 Subject: [PATCH] eth/catalyst: implement exchangeCapabilities method (#26555) Spec: ethereum/execution-apis#364 --- eth/catalyst/api.go | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/eth/catalyst/api.go b/eth/catalyst/api.go index 3b931abffe45..dd6fa2349e08 100644 --- a/eth/catalyst/api.go +++ b/eth/catalyst/api.go @@ -79,6 +79,17 @@ const ( beaconUpdateWarnFrequency = 5 * time.Minute ) +// All methods provided over the engine endpoint. +var caps = []string{ + "engine_forkchoiceUpdatedV1", + "engine_forkchoiceUpdatedV2", + "engine_exchangeTransitionConfigurationV1", + "engine_getPayloadV1", + "engine_getPayloadV2", + "engine_newPayloadV1", + "engine_newPayloadV2", +} + type ConsensusAPI struct { eth *eth.Ethereum @@ -732,3 +743,8 @@ func (api *ConsensusAPI) heartbeat() { } } } + +// ExchangeCapabilities returns the current methods provided by this node. +func (api *ConsensusAPI) ExchangeCapabilities([]string) []string { + return caps +}