From a682095ab9a45e70be05549fb17c1b78f293d74e Mon Sep 17 00:00:00 2001 From: evenevent Date: Thu, 27 Mar 2025 16:08:54 +0800 Subject: [PATCH] chore: make function comment match function name Signed-off-by: evenevent --- lib/connection_manager.go | 2 +- lib/errors.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/lib/connection_manager.go b/lib/connection_manager.go index 583c5f3..630f874 100644 --- a/lib/connection_manager.go +++ b/lib/connection_manager.go @@ -219,7 +219,7 @@ func (connectionManager *ConnectionManager) switchToNodeLocked(mode, index int, return &nodes[index], nil } -// SwitchToNextNode switches to the next node in the list. +// SwitchToNextQueryNode switches to the next node in the list. // Node change is persistent, so it will be used again in the next call // Returns current node if error func (connectionManager *ConnectionManager) SwitchToNextQueryNode() (*NodeConfig, error) { diff --git a/lib/errors.go b/lib/errors.go index e2d6cea..02b7bb0 100644 --- a/lib/errors.go +++ b/lib/errors.go @@ -74,7 +74,7 @@ var HTTPStatusCodeCodesSwitchingNode = map[int]bool{ const GAS_EXCESS_CORRECTION uint64 = 20000 -// calculateExponentialBackoffDelay returns a duration based on retry count and base delay +// calculateExponentialBackoffDelaySeconds returns a duration based on retry count and base delay func calculateExponentialBackoffDelaySeconds(baseDelay int64, retryCount int64) int64 { return int64(math.Pow(float64(baseDelay), float64(retryCount))) }