From 3e3991cef8e397557eee2c55a8fee10df5bbbcc1 Mon Sep 17 00:00:00 2001 From: Anna Shaleva Date: Tue, 13 Aug 2024 18:57:31 +0300 Subject: [PATCH] rpcclient: remove default PolingBased poll interval pollTime is never 0 since MillisecondsPerBlock protocol configuration value is present in `getversion` RPC response since 0.97.3 release. We don't have such old RPC servers in the network anymore, thus this fallback code may be safely removed. Signed-off-by: Anna Shaleva --- pkg/rpcclient/waiter/waiter.go | 3 --- 1 file changed, 3 deletions(-) diff --git a/pkg/rpcclient/waiter/waiter.go b/pkg/rpcclient/waiter/waiter.go index 830fe20cf..e118dfe3b 100644 --- a/pkg/rpcclient/waiter/waiter.go +++ b/pkg/rpcclient/waiter/waiter.go @@ -167,9 +167,6 @@ func (w *PollingBased) WaitAny(ctx context.Context, vub uint32, hashes ...util.U failedAttempt int pollTime = time.Millisecond * time.Duration(w.version.Protocol.MillisecondsPerBlock) / 2 ) - if pollTime == 0 { - pollTime = time.Second - } timer := time.NewTicker(pollTime) defer timer.Stop() for {