Skip to content

Commit 064fcc6

Browse files
committed
remove unnecessary arguments
1 parent 0c977fc commit 064fcc6

File tree

3 files changed

+3
-8
lines changed

3 files changed

+3
-8
lines changed

cmd/tss/main.go

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,8 +12,6 @@ import (
1212

1313
"github.com/cosmos/cosmos-sdk/client/input"
1414
golog "github.com/ipfs/go-log"
15-
"github.com/libp2p/go-libp2p/core/peer"
16-
1715
"gitlab.com/thorchain/tss/go-tss/common"
1816
"gitlab.com/thorchain/tss/go-tss/conversion"
1917
"gitlab.com/thorchain/tss/go-tss/p2p"
@@ -64,7 +62,6 @@ func main() {
6462
nil,
6563
p2pConf.ExternalIP,
6664
os.Getenv("PASSWORD"),
67-
[]peer.ID{},
6865
)
6966
if nil != err {
7067
log.Fatal(err)

p2p/communication.go

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -59,11 +59,10 @@ type Communication struct {
5959
BroadcastMsgChan chan *messages.BroadcastMsgChan
6060
externalAddr maddr.Multiaddr
6161
streamMgr *StreamMgr
62-
whitelistedPeers []peer.ID
6362
}
6463

6564
// NewCommunication create a new instance of Communication
66-
func NewCommunication(rendezvous string, bootstrapPeers []maddr.Multiaddr, port int, externalIP string, whitelistedPeers []peer.ID) (*Communication, error) {
65+
func NewCommunication(rendezvous string, bootstrapPeers []maddr.Multiaddr, port int, externalIP string) (*Communication, error) {
6766
addr, err := maddr.NewMultiaddr(fmt.Sprintf("/ip4/0.0.0.0/tcp/%d", port))
6867
if err != nil {
6968
return nil, fmt.Errorf("fail to create listen addr: %w", err)
@@ -88,7 +87,6 @@ func NewCommunication(rendezvous string, bootstrapPeers []maddr.Multiaddr, port
8887
BroadcastMsgChan: make(chan *messages.BroadcastMsgChan, 1024),
8988
externalAddr: externalAddr,
9089
streamMgr: NewStreamMgr(),
91-
whitelistedPeers: whitelistedPeers,
9290
}, nil
9391
}
9492

tss/tss.go

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -59,7 +59,7 @@ func NewTss(
5959
preParams *bkeygen.LocalPreParams,
6060
externalIP string,
6161
tssPassword string,
62-
whitelistedPeers []peer.ID,
62+
6363
) (*TssServer, error) {
6464
pk := coskey.PubKey{
6565
Key: priKey.PubKey().Bytes()[:],
@@ -83,7 +83,7 @@ func NewTss(
8383
bootstrapPeers = savedPeers
8484
bootstrapPeers = append(bootstrapPeers, cmdBootstrapPeers...)
8585
}
86-
comm, err := p2p.NewCommunication(rendezvous, bootstrapPeers, p2pPort, externalIP, whitelistedPeers)
86+
comm, err := p2p.NewCommunication(rendezvous, bootstrapPeers, p2pPort, externalIP)
8787
if err != nil {
8888
return nil, fmt.Errorf("fail to create communication layer: %w", err)
8989
}

0 commit comments

Comments
 (0)