rpc: revert PendingChannels panic temp patch fix

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.
This commit is contained in:
Olaoluwa Osuntokun 2017-02-24 16:14:05 -08:00
parent 178f561a2a
commit c137dc53df
No known key found for this signature in database
GPG Key ID: 9CC5B105D03521A2

@ -769,16 +769,11 @@ func (r *rpcServer) PendingChannels(ctx context.Context,
return nil, err
}
for _, pendingOpen := range pendingOpenChans {
channelPointStr := "<non initialized yet>"
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),