From c137dc53dff20c0fe967b6b662437f770dd2e7b9 Mon Sep 17 00:00:00 2001 From: Olaoluwa Osuntokun Date: Fri, 24 Feb 2017 16:14:05 -0800 Subject: [PATCH] rpc: revert PendingChannels panic temp patch fix MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit With the funding manager’s state gaining full durability, it only will return channels that are currently “pending” as a response to the PendingChannels RPC call. As a result, the prior edge case where a user would issue a PendingChannels RPC call mid funding flow is no longer possible and channels are read from disk rather then from the fundingMgr’s limbo state. --- rpcserver.go | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/rpcserver.go b/rpcserver.go index 6069c9f5..f2069c4d 100644 --- a/rpcserver.go +++ b/rpcserver.go @@ -769,16 +769,11 @@ func (r *rpcServer) PendingChannels(ctx context.Context, return nil, err } for _, pendingOpen := range pendingOpenChans { - channelPointStr := "" - if pendingOpen.channelPoint != nil { - channelPointStr = pendingOpen.channelPoint.String() - } - // TODO(roasbeef): add confirmation progress pub := pendingOpen.identityPub.SerializeCompressed() pendingChan := &lnrpc.PendingChannelResponse_PendingChannel{ IdentityKey: hex.EncodeToString(pub), - ChannelPoint: channelPointStr, + ChannelPoint: pendingOpen.channelPoint.String(), Capacity: int64(pendingOpen.capacity), LocalBalance: int64(pendingOpen.localBalance), RemoteBalance: int64(pendingOpen.remoteBalance),