lndc+lnd: fix panic when connecting to multiple peers, plus duplicate conn detection

This commit is contained in:
Olaoluwa Osuntokun committed 2016-07-16 18:01:05 -07:00
1 parent 9780f06faf
commit 2a57f9182a
4 files changed
+50 -18

No files matched your search

+1 -1
View File
@@ -172,7 +172,7 @@ func (r *rpcServer) ConnectPeer(ctx context.Context,
idAtHost := fmt.Sprintf("%v@%v", in.Addr.PubKeyHash, in.Addr.Host)
rpcsLog.Debugf("[connectpeer] peer=%v", idAtHost)
peerAddr, err := lndc.LnAddrFromString(idAtHost)
peerAddr, err := lndc.LnAddrFromString(idAtHost, activeNetParams.Params)
if err != nil {
rpcsLog.Errorf("(connectpeer): error parsing ln addr: %v", err)
return nil, err