mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-01-09 22:06:21 +00:00
c8b50765cf
* Fix issue when VC unable to detect errors properly and act accordingly. Switch all API functions used by VC to RestPlainResponse, this allows us to print errors returned by BN servers. * Fix issue when prepareBeaconCommitteeSubnet() do not perform actions when BN is optimistically synced only. * Fix Defect issue. * Fix submit/publish returning `false` when operation was successful. * Address review comments. * Fix some client calls unable to receive `execution_optimistic` field, mark BN as OptSynced when such request has been made. * Adjust warning levels. --------- Co-authored-by: Jacek Sieka <jacek@status.im>
34 lines
1.5 KiB
Nim
34 lines
1.5 KiB
Nim
# Copyright (c) 2018-2023 Status Research & Development GmbH
|
|
# Licensed and distributed under either of
|
|
# * MIT license (license terms in the root directory or at https://opensource.org/licenses/MIT).
|
|
# * Apache v2 license (license terms in the root directory or at https://www.apache.org/licenses/LICENSE-2.0).
|
|
# at your option. This file may not be copied, modified, or distributed except according to those terms.
|
|
|
|
{.push raises: [].}
|
|
|
|
import
|
|
chronos, presto/client,
|
|
"."/[rest_types, eth2_rest_serialization]
|
|
|
|
export chronos, client, rest_types, eth2_rest_serialization
|
|
|
|
proc getForkSchedule*(): RestResponse[GetForkScheduleResponse] {.
|
|
rest, endpoint: "/eth/v1/config/fork_schedule", meth: MethodGet.}
|
|
## https://ethereum.github.io/beacon-APIs/#/Config/getForkSchedule
|
|
|
|
proc getForkSchedulePlain*(): RestPlainResponse {.
|
|
rest, endpoint: "/eth/v1/config/fork_schedule", meth: MethodGet.}
|
|
## https://ethereum.github.io/beacon-APIs/#/Config/getForkSchedule
|
|
|
|
proc getSpec*(): RestResponse[GetSpecResponse] {.
|
|
rest, endpoint: "/eth/v1/config/spec", meth: MethodGet.}
|
|
## https://ethereum.github.io/beacon-APIs/#/Config/getSpec
|
|
|
|
proc getSpecVC*(): RestResponse[GetSpecVCResponse] {.
|
|
rest, endpoint: "/eth/v1/config/spec", meth: MethodGet.}
|
|
## https://ethereum.github.io/beacon-APIs/#/Config/getSpec
|
|
|
|
proc getDepositContract*(): RestResponse[GetDepositContractResponse] {.
|
|
rest, endpoint: "/eth/v1/config/deposit_contract", meth: MethodGet.}
|
|
## https://ethereum.github.io/beacon-APIs/#/Config/getDepositContract
|