Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
AeonSw4n committed Jan 28, 2024
1 parent d8c747b commit fd62d97
Showing 1 changed file with 0 additions and 11 deletions.
11 changes: 0 additions & 11 deletions lib/connection_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ import (
"github.com/deso-protocol/core/bls"
"github.com/deso-protocol/core/collections"
"github.com/deso-protocol/core/consensus"
"github.com/deso-protocol/go-deadlock"
"github.com/golang/glog"
"github.com/pkg/errors"
"net"
Expand Down Expand Up @@ -37,15 +36,6 @@ type ConnectionController struct {
// it's aware of at random and provides it to us.
AddrMgr *addrmgr.AddrManager

// addrsToBroadcast is a list of all the addresses we've received from valid addr
// messages that we intend to broadcast to our peers. It is organized as:
// <recipient address> -> <list of addresses we received from that recipient>.
//
// It is organized in this way so that we can limit the number of addresses we
// are distributing for a single peer to avoid a DOS attack.
addrsToBroadcastLock deadlock.RWMutex
addrsToBroadcast map[string][]*SingleAddr

// When --connect-ips is set, we don't connect to anything from the addrmgr.
connectIps []string
// persistentIpToRemoteNodeIdsMap maps persistent IP addresses, like the --connect-ips, to the RemoteNodeIds of the
Expand Down Expand Up @@ -86,7 +76,6 @@ func NewConnectionController(params *DeSoParams, cmgr *ConnectionManager, handsh
rnManager: rnManager,
AddrMgr: addrMgr,
connectIps: connectIps,
addrsToBroadcast: make(map[string][]*SingleAddr),
persistentIpToRemoteNodeIdsMap: collections.NewConcurrentMap[string, RemoteNodeId](),
validatorMap: collections.NewConcurrentMap[bls.SerializedPublicKey, consensus.Validator](),
targetNonValidatorOutboundRemoteNodes: targetNonValidatorOutboundRemoteNodes,
Expand Down

0 comments on commit fd62d97

Please sign in to comment.