Don't rely on a metric value for the ETH display in the status bar

This commit is contained in:
Zahary Karadjov 2020-11-29 23:35:39 +02:00
parent cabb07a186
commit ac9bdde543
No known key found for this signature in database
GPG Key ID: C8936F8A3073D609
3 changed files with 3 additions and 1 deletions

View File

@ -56,6 +56,7 @@ type
genesisSnapshotContent*: string
attestationSubnets*: AttestationSubnets
processor*: ref Eth2Processor
attachedValidatorBalanceTotal*: uint64
const
MaxEmptySlotCount* = uint64(10*60) div SECONDS_PER_SLOT

View File

@ -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):

View File

@ -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