From bc1a2286457809a8075a8ac97d2744e77400d14e Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Mon, 15 May 2017 18:13:39 -0700 Subject: [PATCH] test: remove unnecessary sleep before pendingChannels query --- lnd_test.go | 1 - rpcserver.go | 3 +++ 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/lnd_test.go b/lnd_test.go index 762c0269..883695f9 100644 --- a/lnd_test.go +++ b/lnd_test.go @@ -700,7 +700,6 @@ func testChannelForceClosure(net *networkHarness, t *harnessTest) { // Now that the channel has been force closed, it should show up in the // PendingChannels RPC under the force close section. - time.Sleep(time.Millisecond * 300) pendingChansRequest := &lnrpc.PendingChannelRequest{} pendingChanResp, err := net.Alice.PendingChannels(ctxb, pendingChansRequest) if err != nil { diff --git a/rpcserver.go b/rpcserver.go index c86a78e1..3a9ff20f 100644 --- a/rpcserver.go +++ b/rpcserver.go @@ -573,6 +573,9 @@ func (r *rpcServer) CloseChannel(in *lnrpc.CloseChannelRequest, // then we'll also purge all of its indexes. remotePub := &channel.StateSnapshot().RemoteIdentity if peer, err := r.server.findPeer(remotePub); err == nil { + // TODO(roasbeef): actually get the active channel + // instead too? + // * so only need to grab from database wipeChannel(peer, channel) } else { chanID := lnwire.NewChanIDFromOutPoint(channel.ChannelPoint())