Skip to content

Commit 422b2af

Browse files
avoid changing in solana
1 parent ead6281 commit 422b2af

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

metrics/balance.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ import (
1313
)
1414

1515
var (
16-
nodeBalance = promauto.NewGaugeVec(
16+
NodeBalance = promauto.NewGaugeVec(
1717
prometheus.GaugeOpts{Name: "node_balance", Help: "Account balances"},
1818
[]string{"account", "chainID", "chainFamily"},
1919
)
@@ -45,7 +45,7 @@ func NewGenericBalanceMetrics(network string, chainID string) (GenericBalanceMet
4545
}
4646

4747
func (m *balanceMetrics) RecordNodeBalance(ctx context.Context, account string, balance float64) {
48-
nodeBalance.WithLabelValues(account, m.chainID, m.network).Set(balance)
48+
NodeBalance.WithLabelValues(account, m.chainID, m.network).Set(balance)
4949
m.nodeBalance.Record(ctx, balance, metric.WithAttributes(
5050
attribute.String("network", m.network),
5151
attribute.String("chainID", m.chainID),

metrics/balance_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ func TestBalanceMetrics_RecordNodeBalance(t *testing.T) {
1818
m.RecordNodeBalance(t.Context(), "account", 5.5)
1919
require.InEpsilon(t,
2020
5.5,
21-
testutil.ToFloat64(nodeBalance.WithLabelValues("account", "1", "test-network")),
21+
testutil.ToFloat64(NodeBalance.WithLabelValues("account", "1", "test-network")),
2222
0.001,
2323
)
2424
}

0 commit comments

Comments
 (0)