From 601841ef35a395860a8f22534f78a162a6071571 Mon Sep 17 00:00:00 2001 From: Roman Khimov Date: Wed, 12 May 2021 19:41:23 +0300 Subject: [PATCH] *: drop unused structure fields Found by structcheck: `good` is unused (structcheck) and alike. --- pkg/compiler/vars.go | 1 - pkg/network/helper_test.go | 1 - pkg/network/tcp_peer.go | 2 -- pkg/rpc/server/server.go | 1 - 4 files changed, 5 deletions(-) diff --git a/pkg/compiler/vars.go b/pkg/compiler/vars.go index 4753d56f8..7b21151a4 100644 --- a/pkg/compiler/vars.go +++ b/pkg/compiler/vars.go @@ -6,7 +6,6 @@ import ( type varScope struct { localsCnt int - argCnt int arguments map[string]int locals []map[string]varInfo } diff --git a/pkg/network/helper_test.go b/pkg/network/helper_test.go index 0be730bb1..4a1779a78 100644 --- a/pkg/network/helper_test.go +++ b/pkg/network/helper_test.go @@ -19,7 +19,6 @@ import ( type testDiscovery struct { sync.Mutex bad []string - good []string connected []string unregistered []string backfill []string diff --git a/pkg/network/tcp_peer.go b/pkg/network/tcp_peer.go index d0ba1c576..85678d297 100644 --- a/pkg/network/tcp_peer.go +++ b/pkg/network/tcp_peer.go @@ -58,8 +58,6 @@ type TCPPeer struct { p2pSendQ chan []byte hpSendQ chan []byte - wg sync.WaitGroup - // track outstanding getaddr requests. getAddrSent atomic.Int32 diff --git a/pkg/rpc/server/server.go b/pkg/rpc/server/server.go index 4d65a437e..ab3e5bca7 100644 --- a/pkg/rpc/server/server.go +++ b/pkg/rpc/server/server.go @@ -59,7 +59,6 @@ type ( subsLock sync.RWMutex subscribers map[*subscriber]bool - subsGroup sync.WaitGroup blockSubs int executionSubs int notificationSubs int