Skip to content

Commit

Permalink
Don't rely on a metric value for the ETH display in the status bar
Browse files Browse the repository at this point in the history
  • Loading branch information
zah committed Nov 29, 2020
1 parent cabb07a commit ac9bdde
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 1 deletion.
1 change: 1 addition & 0 deletions beacon_chain/beacon_node_common.nim
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ type
genesisSnapshotContent*: string
attestationSubnets*: AttestationSubnets
processor*: ref Eth2Processor
attachedValidatorBalanceTotal*: uint64

const
MaxEmptySlotCount* = uint64(10*60) div SECONDS_PER_SLOT
Expand Down
2 changes: 1 addition & 1 deletion beacon_chain/nimbus_beacon_node.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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):
Expand Down
1 change: 1 addition & 0 deletions beacon_chain/validator_duties.nim
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit ac9bdde

Please sign in to comment.