Fix validator_client.
This commit is contained in:
parent
fa54acf40b
commit
7a3bbfd6e2
|
@ -10,6 +10,7 @@
|
||||||
|
|
||||||
import std/strutils
|
import std/strutils
|
||||||
import unittest2
|
import unittest2
|
||||||
|
import chronos/unittest2/asynctests
|
||||||
import ../beacon_chain/validator_client/common
|
import ../beacon_chain/validator_client/common
|
||||||
|
|
||||||
const
|
const
|
||||||
|
@ -325,14 +326,14 @@ suite "Validator Client test suite":
|
||||||
else:
|
else:
|
||||||
err("Content-Type not supported")
|
err("Content-Type not supported")
|
||||||
|
|
||||||
proc submitBeaconCommitteeSelectionsPlain*(
|
proc submitBeaconCommitteeSelectionsPlain(
|
||||||
body: seq[RestBeaconCommitteeSelection]
|
body: seq[RestBeaconCommitteeSelection]
|
||||||
): RestPlainResponse {.
|
): RestPlainResponse {.
|
||||||
rest, endpoint: "/eth/v1/validator/beacon_committee_selections",
|
rest, endpoint: "/eth/v1/validator/beacon_committee_selections",
|
||||||
meth: MethodPost.}
|
meth: MethodPost.}
|
||||||
## https://ethereum.github.io/beacon-APIs/#/Validator/submitBeaconCommitteeSelections
|
## https://ethereum.github.io/beacon-APIs/#/Validator/submitBeaconCommitteeSelections
|
||||||
|
|
||||||
proc submitSyncCommitteeSelectionsPlain*(
|
proc submitSyncCommitteeSelectionsPlain(
|
||||||
body: seq[RestSyncCommitteeSelection]
|
body: seq[RestSyncCommitteeSelection]
|
||||||
): RestPlainResponse {.
|
): RestPlainResponse {.
|
||||||
rest, endpoint: "/eth/v1/validator/sync_committee_selections",
|
rest, endpoint: "/eth/v1/validator/sync_committee_selections",
|
||||||
|
@ -343,7 +344,11 @@ suite "Validator Client test suite":
|
||||||
process: HttpProcessCallback, secure: bool): HttpServerRef =
|
process: HttpProcessCallback, secure: bool): HttpServerRef =
|
||||||
let
|
let
|
||||||
socketFlags = {ServerFlags.TcpNoDelay, ServerFlags.ReuseAddr}
|
socketFlags = {ServerFlags.TcpNoDelay, ServerFlags.ReuseAddr}
|
||||||
res = HttpServerRef.new(address, process, socketFlags = socketFlags)
|
res =
|
||||||
|
try:
|
||||||
|
HttpServerRef.new(address, process, socketFlags = socketFlags)
|
||||||
|
except CatchableError as exc:
|
||||||
|
raiseAssert "Got an exception " & $exc.msg
|
||||||
res.get()
|
res.get()
|
||||||
|
|
||||||
test "normalizeUri() test vectors":
|
test "normalizeUri() test vectors":
|
||||||
|
|
Loading…
Reference in New Issue