Skip to content

Commit

Permalink
[FAB-3706] Delete unused vars, etc in gossip dir
Browse files Browse the repository at this point in the history
This patchset deletes unused vars etc in gossip directory.

Change-Id: I059e4efb7b704b5763b925749b186f2ddf799f69
Signed-off-by: Nao Nishijima <[email protected]>
  • Loading branch information
Nao Nishijima authored and Nao Nishijima committed May 17, 2017
1 parent dbc62f8 commit 25cc9c3
Show file tree
Hide file tree
Showing 5 changed files with 0 additions and 38 deletions.
2 changes: 0 additions & 2 deletions gossip/discovery/discovery_impl.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,8 +82,6 @@ type gossipDiscoveryImpl struct {

msgStore *aliveMsgStore

bootstrapPeers []string

comm CommService
crypt CryptoService
lock *sync.RWMutex
Expand Down
8 changes: 0 additions & 8 deletions gossip/discovery/discovery_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,14 +66,6 @@ type dummyCommModule struct {
mock *mock.Mock
}

type gossipMsg struct {
*proto.GossipMessage
}

func (m *gossipMsg) GetGossipMessage() *proto.GossipMessage {
return m.GossipMessage
}

type gossipInstance struct {
comm *dummyCommModule
Discovery
Expand Down
21 changes: 0 additions & 21 deletions gossip/election/adapter_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import (
"testing"
"time"

"github.com/hyperledger/fabric/gossip/api"
"github.com/hyperledger/fabric/gossip/common"
"github.com/hyperledger/fabric/gossip/discovery"
"github.com/hyperledger/fabric/gossip/util"
Expand Down Expand Up @@ -165,26 +164,6 @@ func TestAdapterImpl_Gossip(t *testing.T) {

}

type mockMsgCrypto struct {
}

// Sign signs a message, returns a signed message on success
// or an error on failure
func (is *mockMsgCrypto) Sign(msg []byte) ([]byte, error) {
return msg, nil
}

// Verify verifies a signed message
func (is *mockMsgCrypto) Verify(vkID, signature, message []byte) error {
return nil
}

// Get returns the identity of a given pkiID, or error if such an identity
// isn't found
func (is *mockMsgCrypto) Get(pkiID common.PKIidType) (api.PeerIdentityType, error) {
return nil, nil
}

type mockAcceptor struct {
ch chan *proto.GossipMessage
acceptor common.MessageAcceptor
Expand Down
2 changes: 0 additions & 2 deletions gossip/state/state.go
Original file line number Diff line number Diff line change
Expand Up @@ -95,8 +95,6 @@ type GossipStateProviderImpl struct {

commChan <-chan proto.ReceivedMessage

mutex sync.RWMutex

// Queue of payloads which wasn't acquired yet
payloads PayloadsBuffer

Expand Down
5 changes: 0 additions & 5 deletions gossip/util/misc.go
Original file line number Diff line number Diff line change
Expand Up @@ -128,11 +128,6 @@ func (s *Set) Remove(item interface{}) {
delete(s.items, item)
}

type goroutine struct {
id int64
Stack []string
}

// PrintStackTrace prints to stdout
// all goroutines
func PrintStackTrace() {
Expand Down

0 comments on commit 25cc9c3

Please sign in to comment.