diff --git a/cmd/tss/main.go b/cmd/tss/main.go index f458bde..902a348 100644 --- a/cmd/tss/main.go +++ b/cmd/tss/main.go @@ -63,6 +63,8 @@ func main() { nil, p2pConf.ExternalIP, os.Getenv("PASSWORD"), + []string{}, + true, ) if nil != err { log.Fatal(err) diff --git a/keygen/ecdsa/keygen_test.go b/keygen/ecdsa/keygen_test.go index 5093a9d..48302f3 100644 --- a/keygen/ecdsa/keygen_test.go +++ b/keygen/ecdsa/keygen_test.go @@ -118,13 +118,13 @@ func (s *TssECDSAKeygenTestSuite) SetUpTest(c *C) { buf, err := base64.StdEncoding.DecodeString(testPriKeyArr[i]) c.Assert(err, IsNil) if i == 0 { - comm, err := p2p.NewCommunication("asgard", nil, ports[i], "") + comm, err := p2p.NewCommunication("asgard", nil, ports[i], "", []string{}, true) c.Assert(err, IsNil) c.Assert(comm.Start(buf[:]), IsNil) s.comms[i] = comm continue } - comm, err := p2p.NewCommunication("asgard", []maddr.Multiaddr{multiAddr}, ports[i], "") + comm, err := p2p.NewCommunication("asgard", []maddr.Multiaddr{multiAddr}, ports[i], "", []string{}, true) c.Assert(err, IsNil) c.Assert(comm.Start(buf[:]), IsNil) s.comms[i] = comm diff --git a/keygen/eddsa/keygen_test.go b/keygen/eddsa/keygen_test.go index 13e6f87..13a14b7 100644 --- a/keygen/eddsa/keygen_test.go +++ b/keygen/eddsa/keygen_test.go @@ -104,13 +104,13 @@ func (s *EddsaKeygenTestSuite) SetUpTest(c *C) { buf, err := base64.StdEncoding.DecodeString(testPriKeyArr[i]) c.Assert(err, IsNil) if i == 0 { - comm, err := p2p.NewCommunication("asgard", nil, ports[i], "") + comm, err := p2p.NewCommunication("asgard", nil, ports[i], "", []string{}, true) c.Assert(err, IsNil) c.Assert(comm.Start(buf), IsNil) s.comms[i] = comm continue } - comm, err := p2p.NewCommunication("asgard", []maddr.Multiaddr{multiAddr}, ports[i], "") + comm, err := p2p.NewCommunication("asgard", []maddr.Multiaddr{multiAddr}, ports[i], "", []string{}, true) c.Assert(err, IsNil) c.Assert(comm.Start(buf), IsNil) s.comms[i] = comm diff --git a/p2p/whitelist_connection_gater.go b/p2p/whitelist_connection_gater.go index 8ee209d..1d36c01 100644 --- a/p2p/whitelist_connection_gater.go +++ b/p2p/whitelist_connection_gater.go @@ -31,18 +31,18 @@ func NewWhitelistConnectionGater(whitelistedPeers []string, disableWhitelist boo } func (wg *WhitelistConnectionGater) InterceptPeerDial(p peer.ID) (allow bool) { - wg.logger.Info().Msgf("InterceptPeerDial %s", p.String(), wg.disableWhitelist) + wg.logger.Info().Msgf("InterceptPeerDial %s", p.String()) if !wg.disableWhitelist { - wg.logger.Info().Msgf("peer allowed", wg.whitelistedPeers[p.String()]) + wg.logger.Info().Msgf("peer allowed %t", wg.whitelistedPeers[p.String()]) return wg.whitelistedPeers[p.String()] } return true } func (wg *WhitelistConnectionGater) InterceptAddrDial(p peer.ID, m maddr.Multiaddr) (allow bool) { - wg.logger.Info().Msgf("InterceptAddrDial %s", p.String(), wg.disableWhitelist) + wg.logger.Info().Msgf("InterceptAddrDial %s", p.String()) if !wg.disableWhitelist { - wg.logger.Info().Msgf("peer allowed", wg.whitelistedPeers[p.String()]) + wg.logger.Info().Msgf("peer allowed %t", wg.whitelistedPeers[p.String()]) return wg.whitelistedPeers[p.String()] } // Not checking addresses here, just allowing based on peer ID @@ -54,9 +54,9 @@ func (wg *WhitelistConnectionGater) InterceptAccept(network.ConnMultiaddrs) (all } func (wg *WhitelistConnectionGater) InterceptSecured(direction network.Direction, p peer.ID, _ network.ConnMultiaddrs) (allow bool) { - wg.logger.Info().Msgf("InterceptSecured %s", p.String(), wg.disableWhitelist) + wg.logger.Info().Msgf("InterceptSecured %s", p.String()) if !wg.disableWhitelist { - wg.logger.Info().Msgf("peer allowed", wg.whitelistedPeers[p.String()]) + wg.logger.Info().Msgf("peer allowed %t", wg.whitelistedPeers[p.String()]) return wg.whitelistedPeers[p.String()] } // _, allow = wg.whitelistedPeers[p] diff --git a/tss/tss_4nodes_test.go b/tss/tss_4nodes_test.go index be58e52..de7be3e 100644 --- a/tss/tss_4nodes_test.go +++ b/tss/tss_4nodes_test.go @@ -369,7 +369,7 @@ func (s *FourNodeTestSuite) getTssServer(c *C, index int, conf common.TssConfig, } else { peerIDs = nil } - instance, err := NewTss(peerIDs, s.ports[index], priKey, "Asgard", baseHome, conf, s.preParams[index], "", "password") + instance, err := NewTss(peerIDs, s.ports[index], priKey, "Asgard", baseHome, conf, s.preParams[index], "", "password", []string{}, true) c.Assert(err, IsNil) return instance }