mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-02-17 08:56:45 +00:00
parent
e732b080f7
commit
cd9b50bbbc
@ -184,13 +184,26 @@ proc checkSync(vc: ValidatorClientRef,
|
|||||||
return
|
return
|
||||||
node.syncInfo = some(syncInfo)
|
node.syncInfo = some(syncInfo)
|
||||||
node.status =
|
node.status =
|
||||||
|
block:
|
||||||
|
let optimistic =
|
||||||
|
if syncInfo.is_optimistic.isNone():
|
||||||
|
"none"
|
||||||
|
else:
|
||||||
|
$syncInfo.is_optimistic.get()
|
||||||
|
|
||||||
if not(syncInfo.is_syncing) or (syncInfo.sync_distance < SYNC_TOLERANCE):
|
if not(syncInfo.is_syncing) or (syncInfo.sync_distance < SYNC_TOLERANCE):
|
||||||
|
if not(syncInfo.is_optimistic.get(false)):
|
||||||
info "Beacon node is in sync", sync_distance = syncInfo.sync_distance,
|
info "Beacon node is in sync", sync_distance = syncInfo.sync_distance,
|
||||||
head_slot = syncInfo.head_slot
|
head_slot = syncInfo.head_slot, is_opimistic = optimistic
|
||||||
RestBeaconNodeStatus.Online
|
RestBeaconNodeStatus.Online
|
||||||
|
else:
|
||||||
|
warn "Beacon node is optimistically synced only",
|
||||||
|
sync_distance = syncInfo.sync_distance,
|
||||||
|
head_slot = syncInfo.head_slot, is_opimistic = optimistic
|
||||||
|
RestBeaconNodeStatus.NotSynced
|
||||||
else:
|
else:
|
||||||
warn "Beacon node not in sync", sync_distance = syncInfo.sync_distance,
|
warn "Beacon node not in sync", sync_distance = syncInfo.sync_distance,
|
||||||
head_slot = syncInfo.head_slot
|
head_slot = syncInfo.head_slot, is_opimistic = optimistic
|
||||||
RestBeaconNodeStatus.NotSynced
|
RestBeaconNodeStatus.NotSynced
|
||||||
|
|
||||||
proc checkOnline(node: BeaconNodeServerRef) {.async.} =
|
proc checkOnline(node: BeaconNodeServerRef) {.async.} =
|
||||||
|
Loading…
x
Reference in New Issue
Block a user