From d2c2ff2165608f5714026332b55bd25e7b733336 Mon Sep 17 00:00:00 2001 From: Matt Johnstone Date: Tue, 5 Nov 2024 20:54:24 +0200 Subject: [PATCH] minor readme update + jeffs nits --- README.md | 3 --- cmd/solana-exporter/config.go | 8 ++++---- cmd/solana-exporter/utils_test.go | 1 + pkg/rpc/client_test.go | 1 + 4 files changed, 6 insertions(+), 7 deletions(-) diff --git a/README.md b/README.md index 85ea949..c64d150 100644 --- a/README.md +++ b/README.md @@ -56,9 +56,6 @@ The exporter is configured via the following command line arguments: * Configuring `-monitor-block-sizes` with many `-nodekey`'s can potentially strain the node - every block produced by a configured `-nodekey` is fetched, and a typical block can be as large as 5MB. -If you want verbose logs, specify `-v=`. Higher verbosity means more debug output. For most users, the default -verbosity level is fine. If you want detailed log output for missed blocks, run with `-v=1`. - ## Metrics ### Overview diff --git a/cmd/solana-exporter/config.go b/cmd/solana-exporter/config.go index 931ddff..ba9128b 100644 --- a/cmd/solana-exporter/config.go +++ b/cmd/solana-exporter/config.go @@ -61,19 +61,19 @@ func NewExporterConfig( ) if lightMode { if comprehensiveSlotTracking { - return nil, fmt.Errorf("'-light-mode' is imcompatible with `-comprehensive-slot-tracking`") + return nil, fmt.Errorf("'-light-mode' is incompatible with `-comprehensive-slot-tracking`") } if monitorBlockSizes { - return nil, fmt.Errorf("'-light-mode' is imcompatible with `-monitor-block-sizes`") + return nil, fmt.Errorf("'-light-mode' is incompatible with `-monitor-block-sizes`") } if len(nodeKeys) > 0 { - return nil, fmt.Errorf("'-light-mode' is imcompatible with `-nodekey`") + return nil, fmt.Errorf("'-light-mode' is incompatible with `-nodekey`") } if len(balanceAddresses) > 0 { - return nil, fmt.Errorf("'-light-mode' is imcompatible with `-balance-addresses`") + return nil, fmt.Errorf("'-light-mode' is incompatible with `-balance-addresses`") } } diff --git a/cmd/solana-exporter/utils_test.go b/cmd/solana-exporter/utils_test.go index 0796341..ed689bb 100644 --- a/cmd/solana-exporter/utils_test.go +++ b/cmd/solana-exporter/utils_test.go @@ -101,4 +101,5 @@ func TestCountVoteTransactions(t *testing.T) { assert.NoError(t, err) // https://explorer.solana.com/block/297609329 assert.Equal(t, 1048, voteCount) + assert.Equal(t, 446, len(block.Transactions)-voteCount) } diff --git a/pkg/rpc/client_test.go b/pkg/rpc/client_test.go index 9b57f39..b21b512 100644 --- a/pkg/rpc/client_test.go +++ b/pkg/rpc/client_test.go @@ -7,6 +7,7 @@ import ( ) func newMethodTester(t *testing.T, method string, result any) (*MockServer, *Client) { + t.Helper() return NewMockClient(t, map[string]any{method: result}, nil, nil, nil, nil) }