Rebase and fixes.
This commit is contained in:
parent
dba69f0ddf
commit
5885068c63
|
@ -292,7 +292,7 @@ type
|
||||||
name: "rest-port" }: Port
|
name: "rest-port" }: Port
|
||||||
|
|
||||||
restAddress* {.
|
restAddress* {.
|
||||||
defaultValue: defaultAdminListenAddress(config)
|
defaultValue: defaultAdminListenAddress
|
||||||
desc: "Listening address of the REST server"
|
desc: "Listening address of the REST server"
|
||||||
name: "rest-address" }: ValidIpAddress
|
name: "rest-address" }: ValidIpAddress
|
||||||
|
|
||||||
|
|
|
@ -73,7 +73,7 @@ type
|
||||||
|
|
||||||
# Almost validated, pending cryptographic signature check
|
# Almost validated, pending cryptographic signature check
|
||||||
# ----------------------------------------------------------------
|
# ----------------------------------------------------------------
|
||||||
batchCrypto: ref BatchCrypto
|
batchCrypto*: ref BatchCrypto
|
||||||
|
|
||||||
# Missing information
|
# Missing information
|
||||||
# ----------------------------------------------------------------
|
# ----------------------------------------------------------------
|
||||||
|
|
|
@ -752,8 +752,9 @@ proc installBeaconApiHandlers*(router: var RestRouter, node: BeaconNode) =
|
||||||
var failures: seq[RestAttestationsFailureTuple]
|
var failures: seq[RestAttestationsFailureTuple]
|
||||||
for atindex, attestation in attestations.pairs():
|
for atindex, attestation in attestations.pairs():
|
||||||
let wallTime = node.processor.getWallTime()
|
let wallTime = node.processor.getWallTime()
|
||||||
let res = node.attestationPool[].validateAttestation(
|
let res = await node.attestationPool.validateAttestation(
|
||||||
attestation, wallTime, attestation.data.index, true
|
node.processor.batchCrypto, attestation, wallTime,
|
||||||
|
attestation.data.index, true
|
||||||
)
|
)
|
||||||
if res.isErr():
|
if res.isErr():
|
||||||
failures.add((index: uint64(atindex), message: $res.error()))
|
failures.add((index: uint64(atindex), message: $res.error()))
|
||||||
|
|
|
@ -323,7 +323,9 @@ proc installValidatorApiHandlers*(router: var RestRouter, node: BeaconNode) =
|
||||||
dres.get()
|
dres.get()
|
||||||
|
|
||||||
let wallTime = node.processor.getWallTime()
|
let wallTime = node.processor.getWallTime()
|
||||||
let res = node.attestationPool[].validateAggregate(payload, wallTime)
|
let res = await node.attestationPool.validateAggregate(
|
||||||
|
node.processor.batchCrypto, payload, wallTime
|
||||||
|
)
|
||||||
if res.isErr():
|
if res.isErr():
|
||||||
return RestApiResponse.jsonError(Http400, "Aggregate and proofs " &
|
return RestApiResponse.jsonError(Http400, "Aggregate and proofs " &
|
||||||
"verification failed", $res.error())
|
"verification failed", $res.error())
|
||||||
|
|
Loading…
Reference in New Issue