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:
parent
178f561a2a
commit
c137dc53df
@ -769,16 +769,11 @@ func (r *rpcServer) PendingChannels(ctx context.Context,
|
|||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
for _, pendingOpen := range pendingOpenChans {
|
for _, pendingOpen := range pendingOpenChans {
|
||||||
channelPointStr := "<non initialized yet>"
|
|
||||||
if pendingOpen.channelPoint != nil {
|
|
||||||
channelPointStr = pendingOpen.channelPoint.String()
|
|
||||||
}
|
|
||||||
|
|
||||||
// TODO(roasbeef): add confirmation progress
|
// TODO(roasbeef): add confirmation progress
|
||||||
pub := pendingOpen.identityPub.SerializeCompressed()
|
pub := pendingOpen.identityPub.SerializeCompressed()
|
||||||
pendingChan := &lnrpc.PendingChannelResponse_PendingChannel{
|
pendingChan := &lnrpc.PendingChannelResponse_PendingChannel{
|
||||||
IdentityKey: hex.EncodeToString(pub),
|
IdentityKey: hex.EncodeToString(pub),
|
||||||
ChannelPoint: channelPointStr,
|
ChannelPoint: pendingOpen.channelPoint.String(),
|
||||||
Capacity: int64(pendingOpen.capacity),
|
Capacity: int64(pendingOpen.capacity),
|
||||||
LocalBalance: int64(pendingOpen.localBalance),
|
LocalBalance: int64(pendingOpen.localBalance),
|
||||||
RemoteBalance: int64(pendingOpen.remoteBalance),
|
RemoteBalance: int64(pendingOpen.remoteBalance),
|
||||||
|
Loading…
Reference in New Issue
Block a user