get_v1_validator_attestation_data() implementation.
This commit is contained in:
parent
f6285d8381
commit
0904ee5609
|
@ -117,3 +117,12 @@ proc installValidatorApiHandlers*(rpcServer: RpcServer, node: BeaconNode) =
|
||||||
validator_pubkey: ValidatorPubKey, slot_signature: ValidatorSig) -> bool:
|
validator_pubkey: ValidatorPubKey, slot_signature: ValidatorSig) -> bool:
|
||||||
debug "post_v1_validator_beacon_committee_subscriptions"
|
debug "post_v1_validator_beacon_committee_subscriptions"
|
||||||
raise newException(CatchableError, "Not implemented")
|
raise newException(CatchableError, "Not implemented")
|
||||||
|
|
||||||
|
rpcServer.rpc("get_v1_validator_attestation_data") do (
|
||||||
|
slot: uint64, committee_index: uint64) -> AttestationData:
|
||||||
|
let ares = node.attestationPool[].getAggregatedAttestation(slot,
|
||||||
|
committee_index)
|
||||||
|
if ares.isSome():
|
||||||
|
return ares.get().data
|
||||||
|
else:
|
||||||
|
raise newException(CatchableError, "Could not create attestation data!")
|
||||||
|
|
Loading…
Reference in New Issue