From 6e2fb4e60dc0ed07875e94da0b588a1a52a4bf84 Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Sat, 24 Dec 2016 18:51:25 -0600 Subject: [PATCH] lnd: minor typo fixes --- invoiceregistry.go | 2 +- server.go | 8 ++++---- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/invoiceregistry.go b/invoiceregistry.go index d8f18c80..90b6913d 100644 --- a/invoiceregistry.go +++ b/invoiceregistry.go @@ -157,7 +157,7 @@ func (i *invoiceRegistry) SettleInvoice(rHash wire.ShaHash) error { return nil } -// notifyClients notifies all currently registered invoice notificaiton clients +// notifyClients notifies all currently registered invoice notification clients // of a newly added/settled invoice. func (i *invoiceRegistry) notifyClients(invoice *channeldb.Invoice, settle bool) { i.clientMtx.Lock() diff --git a/server.go b/server.go index 7690a64f..2325cc00 100644 --- a/server.go +++ b/server.go @@ -23,8 +23,8 @@ import ( "github.com/lightningnetwork/lnd/routing/rt/graph" ) -// server is the main server of the Lightning Network Daemon. The server -// houses global state pertianing to the wallet, database, and the rpcserver. +// server is the main server of the Lightning Network Daemon. The server houses +// global state pertaining to the wallet, database, and the rpcserver. // Additionally, the server is also used as a central messaging bus to interact // with any of its companion objects. type server struct { @@ -339,6 +339,7 @@ func (s *server) peerConnected(conn net.Conn, connReq *connmgr.ConnReq, inbound // If this was an RPC initiated outbound connection that was // successfully established, then send a response back to the client so + // they won't be blocked indefinitely. pubStr := string(peerAddr.IdentityKey.SerializeCompressed()) s.pendingConnMtx.RLock() msg, ok := s.pendingConnRequests[pubStr] @@ -380,7 +381,6 @@ func (s *server) inboundPeerConnected(conn net.Conn) { // up with a duplicate connecting to the same peer. s.pendingConnMtx.RLock() if connReq, ok := s.persistentConnReqs[pubStr]; ok { - fmt.Println("trying to cancel out attempt") s.connMgr.Remove(connReq.ID()) } s.pendingConnMtx.RUnlock() @@ -581,7 +581,7 @@ func (s *server) handleConnectPeer(msg *connectPeerMsg) { // If there's not already a pending or active connection to this node, // then instruct the connection manager to attempt to establish a // persistent connection to the peer. - srvrLog.Debugf("connecting to %v", addr) + srvrLog.Debugf("Connecting to %v", addr) go s.connMgr.Connect(&connmgr.ConnReq{ Addr: addr, Permanent: true,