mirror of https://github.com/BTCPrivate/lnd.git
test: remove unnecessary sleep before pendingChannels query
This commit is contained in:
parent
80598dff11
commit
bc1a228645
|
@ -700,7 +700,6 @@ func testChannelForceClosure(net *networkHarness, t *harnessTest) {
|
||||||
|
|
||||||
// Now that the channel has been force closed, it should show up in the
|
// Now that the channel has been force closed, it should show up in the
|
||||||
// PendingChannels RPC under the force close section.
|
// PendingChannels RPC under the force close section.
|
||||||
time.Sleep(time.Millisecond * 300)
|
|
||||||
pendingChansRequest := &lnrpc.PendingChannelRequest{}
|
pendingChansRequest := &lnrpc.PendingChannelRequest{}
|
||||||
pendingChanResp, err := net.Alice.PendingChannels(ctxb, pendingChansRequest)
|
pendingChanResp, err := net.Alice.PendingChannels(ctxb, pendingChansRequest)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
|
|
|
@ -573,6 +573,9 @@ func (r *rpcServer) CloseChannel(in *lnrpc.CloseChannelRequest,
|
||||||
// then we'll also purge all of its indexes.
|
// then we'll also purge all of its indexes.
|
||||||
remotePub := &channel.StateSnapshot().RemoteIdentity
|
remotePub := &channel.StateSnapshot().RemoteIdentity
|
||||||
if peer, err := r.server.findPeer(remotePub); err == nil {
|
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)
|
wipeChannel(peer, channel)
|
||||||
} else {
|
} else {
|
||||||
chanID := lnwire.NewChanIDFromOutPoint(channel.ChannelPoint())
|
chanID := lnwire.NewChanIDFromOutPoint(channel.ChannelPoint())
|
||||||
|
|
Loading…
Reference in New Issue