proposing
This commit is contained in:
parent
dc02f6dfe1
commit
413e798108
|
@ -1402,7 +1402,22 @@ proc sendSyncCommitteeContributions(
|
|||
|
||||
proc handleProposal(node: BeaconNode, head: BlockRef, slot: Slot):
|
||||
Future[BlockRef] {.async: (raises: [CancelledError]).} =
|
||||
return head
|
||||
## Perform the proposal for the given slot, iff we have a validator attached
|
||||
## that is supposed to do so, given the shuffling at that slot for the given
|
||||
## head - to compute the proposer, we need to advance a state to the given
|
||||
## slot
|
||||
let
|
||||
proposer = node.dag.getProposer(head, slot).valueOr:
|
||||
return head
|
||||
proposerKey = node.dag.validatorKey(proposer).get().toPubKey
|
||||
validator = node.getValidatorForDuties(proposer, slot).valueOr:
|
||||
debug "Expecting block proposal", headRoot = shortLog(head.root),
|
||||
slot = shortLog(slot),
|
||||
proposer_index = proposer,
|
||||
proposer = shortLog(proposerKey)
|
||||
return head
|
||||
|
||||
return await proposeBlock(node, validator, proposer, head, slot)
|
||||
|
||||
proc signAndSendAggregate(
|
||||
node: BeaconNode, validator: AttachedValidator, shufflingRef: ShufflingRef,
|
||||
|
|
Loading…
Reference in New Issue