Skip to content

Commit 25cc9c3

Browse files
Nao NishijimaNao Nishijima
Nao Nishijima
authored and
Nao Nishijima
committed
[FAB-3706] Delete unused vars, etc in gossip dir
This patchset deletes unused vars etc in gossip directory. Change-Id: I059e4efb7b704b5763b925749b186f2ddf799f69 Signed-off-by: Nao Nishijima <[email protected]>
1 parent dbc62f8 commit 25cc9c3

File tree

5 files changed

+0
-38
lines changed

5 files changed

+0
-38
lines changed

gossip/discovery/discovery_impl.go

-2
Original file line numberDiff line numberDiff line change
@@ -82,8 +82,6 @@ type gossipDiscoveryImpl struct {
8282

8383
msgStore *aliveMsgStore
8484

85-
bootstrapPeers []string
86-
8785
comm CommService
8886
crypt CryptoService
8987
lock *sync.RWMutex

gossip/discovery/discovery_test.go

-8
Original file line numberDiff line numberDiff line change
@@ -66,14 +66,6 @@ type dummyCommModule struct {
6666
mock *mock.Mock
6767
}
6868

69-
type gossipMsg struct {
70-
*proto.GossipMessage
71-
}
72-
73-
func (m *gossipMsg) GetGossipMessage() *proto.GossipMessage {
74-
return m.GossipMessage
75-
}
76-
7769
type gossipInstance struct {
7870
comm *dummyCommModule
7971
Discovery

gossip/election/adapter_test.go

-21
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,6 @@ import (
2424
"testing"
2525
"time"
2626

27-
"github.com/hyperledger/fabric/gossip/api"
2827
"github.com/hyperledger/fabric/gossip/common"
2928
"github.com/hyperledger/fabric/gossip/discovery"
3029
"github.com/hyperledger/fabric/gossip/util"
@@ -165,26 +164,6 @@ func TestAdapterImpl_Gossip(t *testing.T) {
165164

166165
}
167166

168-
type mockMsgCrypto struct {
169-
}
170-
171-
// Sign signs a message, returns a signed message on success
172-
// or an error on failure
173-
func (is *mockMsgCrypto) Sign(msg []byte) ([]byte, error) {
174-
return msg, nil
175-
}
176-
177-
// Verify verifies a signed message
178-
func (is *mockMsgCrypto) Verify(vkID, signature, message []byte) error {
179-
return nil
180-
}
181-
182-
// Get returns the identity of a given pkiID, or error if such an identity
183-
// isn't found
184-
func (is *mockMsgCrypto) Get(pkiID common.PKIidType) (api.PeerIdentityType, error) {
185-
return nil, nil
186-
}
187-
188167
type mockAcceptor struct {
189168
ch chan *proto.GossipMessage
190169
acceptor common.MessageAcceptor

gossip/state/state.go

-2
Original file line numberDiff line numberDiff line change
@@ -95,8 +95,6 @@ type GossipStateProviderImpl struct {
9595

9696
commChan <-chan proto.ReceivedMessage
9797

98-
mutex sync.RWMutex
99-
10098
// Queue of payloads which wasn't acquired yet
10199
payloads PayloadsBuffer
102100

gossip/util/misc.go

-5
Original file line numberDiff line numberDiff line change
@@ -128,11 +128,6 @@ func (s *Set) Remove(item interface{}) {
128128
delete(s.items, item)
129129
}
130130

131-
type goroutine struct {
132-
id int64
133-
Stack []string
134-
}
135-
136131
// PrintStackTrace prints to stdout
137132
// all goroutines
138133
func PrintStackTrace() {

0 commit comments

Comments
 (0)