mirror of
https://github.com/status-im/nimbus-eth2.git
synced 2025-01-10 22:36:01 +00:00
Don't rely on a metric value for the ETH display in the status bar
This commit is contained in:
parent
cabb07a186
commit
ac9bdde543
@ -56,6 +56,7 @@ type
|
||||
genesisSnapshotContent*: string
|
||||
attestationSubnets*: AttestationSubnets
|
||||
processor*: ref Eth2Processor
|
||||
attachedValidatorBalanceTotal*: uint64
|
||||
|
||||
const
|
||||
MaxEmptySlotCount* = uint64(10*60) div SECONDS_PER_SLOT
|
||||
|
@ -983,7 +983,7 @@ when hasPrompt:
|
||||
slotStr
|
||||
|
||||
of "attached_validators_balance":
|
||||
formatGwei(attached_validator_balance_total.value.uint64)
|
||||
formatGwei(node.attachedValidatorBalanceTotal)
|
||||
|
||||
of "sync_status":
|
||||
if isNil(node.syncManager):
|
||||
|
@ -576,6 +576,7 @@ proc updateMetrics(node: BeaconNode) =
|
||||
inc i
|
||||
total += balance
|
||||
|
||||
node.attachedValidatorBalanceTotal = total
|
||||
attached_validator_balance_total.set(min(total, int64.high.uint64).int64)
|
||||
else:
|
||||
discard
|
||||
|
Loading…
x
Reference in New Issue
Block a user