Skip to content

Commit

Permalink
ci fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
skosito committed Oct 22, 2024
1 parent a893c99 commit 97ba467
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 11 deletions.
2 changes: 2 additions & 0 deletions cmd/tss/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,8 @@ func main() {
nil,
p2pConf.ExternalIP,
os.Getenv("PASSWORD"),
[]string{},
true,
)
if nil != err {
log.Fatal(err)
Expand Down
4 changes: 2 additions & 2 deletions keygen/ecdsa/keygen_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
4 changes: 2 additions & 2 deletions keygen/eddsa/keygen_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
12 changes: 6 additions & 6 deletions p2p/whitelist_connection_gater.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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]
Expand Down
2 changes: 1 addition & 1 deletion tss/tss_4nodes_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit 97ba467

Please sign in to comment.