@@ -4028,6 +4028,13 @@ func (r *rpcServer) fetchPendingForceCloseChannels() (pendingForceClose,
4028
4028
historical .LocalCommitment .RemoteBalance .ToSatoshis (),
4029
4029
)
4030
4030
4031
+ customChanBytes , err := encodeCustomChanData (historical )
4032
+ if err != nil {
4033
+ return nil , 0 , fmt .Errorf ("unable to encode " +
4034
+ "open chan data: %w" , err )
4035
+ }
4036
+ channel .CustomChannelData = customChanBytes
4037
+
4031
4038
channel .Private = isPrivate (historical )
4032
4039
channel .Memo = string (historical .Memo )
4033
4040
@@ -4218,20 +4225,41 @@ func (r *rpcServer) fetchWaitingCloseChannels(
4218
4225
return nil , 0 , err
4219
4226
}
4220
4227
4228
+ customChanBytes , err := encodeCustomChanData (waitingClose )
4229
+ if err != nil {
4230
+ return nil , 0 , fmt .Errorf ("unable to encode " +
4231
+ "open chan data: %w" , err )
4232
+ }
4233
+
4234
+ localCommit := waitingClose .LocalCommitment
4235
+ chanStatus := waitingClose .ChanStatus ()
4221
4236
channel := & lnrpc.PendingChannelsResponse_PendingChannel {
4222
- RemoteNodePub : hex .EncodeToString (pub ),
4223
- ChannelPoint : chanPoint .String (),
4224
- Capacity : int64 (waitingClose .Capacity ),
4225
- LocalBalance : int64 (waitingClose .LocalCommitment .LocalBalance .ToSatoshis ()),
4226
- RemoteBalance : int64 (waitingClose .LocalCommitment .RemoteBalance .ToSatoshis ()),
4227
- LocalChanReserveSat : int64 (waitingClose .LocalChanCfg .ChanReserve ),
4228
- RemoteChanReserveSat : int64 (waitingClose .RemoteChanCfg .ChanReserve ),
4229
- Initiator : rpcInitiator (waitingClose .IsInitiator ),
4230
- CommitmentType : rpcCommitmentType (waitingClose .ChanType ),
4237
+ RemoteNodePub : hex .EncodeToString (pub ),
4238
+ ChannelPoint : chanPoint .String (),
4239
+ Capacity : int64 (waitingClose .Capacity ),
4240
+ LocalBalance : int64 (
4241
+ localCommit .LocalBalance .ToSatoshis (),
4242
+ ),
4243
+ RemoteBalance : int64 (
4244
+ localCommit .RemoteBalance .ToSatoshis (),
4245
+ ),
4246
+ LocalChanReserveSat : int64 (
4247
+ waitingClose .LocalChanCfg .ChanReserve ,
4248
+ ),
4249
+ RemoteChanReserveSat : int64 (
4250
+ waitingClose .RemoteChanCfg .ChanReserve ,
4251
+ ),
4252
+ Initiator : rpcInitiator (
4253
+ waitingClose .IsInitiator ,
4254
+ ),
4255
+ CommitmentType : rpcCommitmentType (
4256
+ waitingClose .ChanType ,
4257
+ ),
4231
4258
NumForwardingPackages : int64 (len (fwdPkgs )),
4232
- ChanStatusFlags : waitingClose . ChanStatus () .String (),
4259
+ ChanStatusFlags : chanStatus .String (),
4233
4260
Private : isPrivate (waitingClose ),
4234
4261
Memo : string (waitingClose .Memo ),
4262
+ CustomChannelData : customChanBytes ,
4235
4263
}
4236
4264
4237
4265
var closingTxid , closingTxHex string
0 commit comments