diff --git a/lnd_test.go b/lnd_test.go index 901b7a5d..1e3d6dcc 100644 --- a/lnd_test.go +++ b/lnd_test.go @@ -861,6 +861,7 @@ mempoolPoll: // Now that the channel has been fully swept, it should no longer show // up within the pending channels RPC. + time.Sleep(time.Millisecond * 300) pendingChans, err := net.Alice.PendingChannels(ctxb, pendingChansRequest) if err != nil { t.Fatalf("unable to query for pending channels: %v", err) diff --git a/server.go b/server.go index 9c1679df..029937a1 100644 --- a/server.go +++ b/server.go @@ -1140,6 +1140,7 @@ func (s *server) handleConnectPeer(msg *connectPeerMsg) { } s.pendingConnMtx.Lock() + s.persistentPeers[targetPub] = struct{}{} s.persistentConnReqs[targetPub] = append(s.persistentConnReqs[targetPub], connReq) s.pendingConnMtx.Unlock()