mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-01-22 20:42:13 +00:00
Sync with Eth1 even when there are no validators attached
This commit is contained in:
parent
ef1de66316
commit
7902e7684c
@ -941,6 +941,11 @@ proc onSlotStart(
|
||||
|
||||
await node.handleValidatorDuties(lastSlot, wallSlot)
|
||||
|
||||
if node.eth1Monitor != nil and (wallSlot mod SLOTS_PER_EPOCH) == 0:
|
||||
let finalizedEpochRef = node.dag.getFinalizedEpochRef()
|
||||
discard node.eth1Monitor.trackFinalizedState(
|
||||
finalizedEpochRef.eth1_data, finalizedEpochRef.eth1_deposit_index)
|
||||
|
||||
await onSlotEnd(node, wallSlot)
|
||||
|
||||
proc handleMissingBlocks(node: BeaconNode) =
|
||||
@ -1187,7 +1192,7 @@ proc start(node: BeaconNode) {.raises: [Defect, CatchableError].} =
|
||||
|
||||
waitFor node.initializeNetworking()
|
||||
|
||||
if node.eth1Monitor != nil and node.attachedValidators[].count > 0:
|
||||
if node.eth1Monitor != nil:
|
||||
node.eth1Monitor.start()
|
||||
else:
|
||||
notice "Running without execution chain monitor, block producation partially disabled"
|
||||
|
@ -1049,11 +1049,6 @@ proc handleValidatorDuties*(node: BeaconNode, lastSlot, slot: Slot) {.async.} =
|
||||
await handleSyncCommitteeContributionsFut
|
||||
await sendAggregatedAttestationsFut
|
||||
|
||||
if node.eth1Monitor != nil and (slot mod SLOTS_PER_EPOCH) == 0:
|
||||
let finalizedEpochRef = node.dag.getFinalizedEpochRef()
|
||||
discard node.eth1Monitor.trackFinalizedState(
|
||||
finalizedEpochRef.eth1_data, finalizedEpochRef.eth1_deposit_index)
|
||||
|
||||
proc sendAttestation*(node: BeaconNode,
|
||||
attestation: Attestation): Future[SendResult] {.async.} =
|
||||
# REST/JSON-RPC API helper procedure.
|
||||
|
Loading…
x
Reference in New Issue
Block a user