mirror of https://github.com/BTCPrivate/lnd.git
lnd: minor typo fixes
This commit is contained in:
parent
0313dcfc89
commit
6e2fb4e60d
|
@ -157,7 +157,7 @@ func (i *invoiceRegistry) SettleInvoice(rHash wire.ShaHash) error {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
// notifyClients notifies all currently registered invoice notificaiton clients
|
// notifyClients notifies all currently registered invoice notification clients
|
||||||
// of a newly added/settled invoice.
|
// of a newly added/settled invoice.
|
||||||
func (i *invoiceRegistry) notifyClients(invoice *channeldb.Invoice, settle bool) {
|
func (i *invoiceRegistry) notifyClients(invoice *channeldb.Invoice, settle bool) {
|
||||||
i.clientMtx.Lock()
|
i.clientMtx.Lock()
|
||||||
|
|
|
@ -23,8 +23,8 @@ import (
|
||||||
"github.com/lightningnetwork/lnd/routing/rt/graph"
|
"github.com/lightningnetwork/lnd/routing/rt/graph"
|
||||||
)
|
)
|
||||||
|
|
||||||
// server is the main server of the Lightning Network Daemon. The server
|
// server is the main server of the Lightning Network Daemon. The server houses
|
||||||
// houses global state pertianing to the wallet, database, and the rpcserver.
|
// global state pertaining to the wallet, database, and the rpcserver.
|
||||||
// Additionally, the server is also used as a central messaging bus to interact
|
// Additionally, the server is also used as a central messaging bus to interact
|
||||||
// with any of its companion objects.
|
// with any of its companion objects.
|
||||||
type server struct {
|
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
|
// If this was an RPC initiated outbound connection that was
|
||||||
// successfully established, then send a response back to the client so
|
// successfully established, then send a response back to the client so
|
||||||
|
// they won't be blocked indefinitely.
|
||||||
pubStr := string(peerAddr.IdentityKey.SerializeCompressed())
|
pubStr := string(peerAddr.IdentityKey.SerializeCompressed())
|
||||||
s.pendingConnMtx.RLock()
|
s.pendingConnMtx.RLock()
|
||||||
msg, ok := s.pendingConnRequests[pubStr]
|
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.
|
// up with a duplicate connecting to the same peer.
|
||||||
s.pendingConnMtx.RLock()
|
s.pendingConnMtx.RLock()
|
||||||
if connReq, ok := s.persistentConnReqs[pubStr]; ok {
|
if connReq, ok := s.persistentConnReqs[pubStr]; ok {
|
||||||
fmt.Println("trying to cancel out attempt")
|
|
||||||
s.connMgr.Remove(connReq.ID())
|
s.connMgr.Remove(connReq.ID())
|
||||||
}
|
}
|
||||||
s.pendingConnMtx.RUnlock()
|
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,
|
// If there's not already a pending or active connection to this node,
|
||||||
// then instruct the connection manager to attempt to establish a
|
// then instruct the connection manager to attempt to establish a
|
||||||
// persistent connection to the peer.
|
// persistent connection to the peer.
|
||||||
srvrLog.Debugf("connecting to %v", addr)
|
srvrLog.Debugf("Connecting to %v", addr)
|
||||||
go s.connMgr.Connect(&connmgr.ConnReq{
|
go s.connMgr.Connect(&connmgr.ConnReq{
|
||||||
Addr: addr,
|
Addr: addr,
|
||||||
Permanent: true,
|
Permanent: true,
|
||||||
|
|
Loading…
Reference in New Issue