@@ -3121,19 +3121,33 @@ func (s *lightningClient) OpenChannelStream(ctx context.Context,
3121
3121
type CloseChannelUpdate interface {
3122
3122
// CloseTxid returns the closing txid of the channel.
3123
3123
CloseTxid () chainhash.Hash
3124
+
3125
+ // NumberOfPendingHtlcs is the number of pending htlcs that we have
3126
+ // present while a channel close with the NoWait option was in progress.
3127
+ NumberOfPendingHtlcs () int32
3124
3128
}
3125
3129
3126
3130
// PendingCloseUpdate indicates that our closing transaction has been broadcast.
3127
3131
type PendingCloseUpdate struct {
3128
3132
// CloseTx is the closing transaction id.
3129
3133
CloseTx chainhash.Hash
3134
+
3135
+ // NumPendingHtlcs is the number of pending htlcs that we have
3136
+ // present while a channel close with the NoWait option was in progress.
3137
+ NumPendingHtlcs int32
3130
3138
}
3131
3139
3132
3140
// CloseTxid returns the closing txid of the channel.
3133
3141
func (p * PendingCloseUpdate ) CloseTxid () chainhash.Hash {
3134
3142
return p .CloseTx
3135
3143
}
3136
3144
3145
+ // NumberOfPendingHtlcs returns the number of pending htlcs on a pending close
3146
+ // channel.
3147
+ func (p * PendingCloseUpdate ) NumberOfPendingHtlcs () int32 {
3148
+ return p .NumPendingHtlcs
3149
+ }
3150
+
3137
3151
// ChannelClosedUpdate indicates that our channel close has confirmed on chain.
3138
3152
type ChannelClosedUpdate struct {
3139
3153
// CloseTx is the closing transaction id.
@@ -3149,6 +3163,12 @@ func (p *ChannelClosedUpdate) CloseTxid() chainhash.Hash {
3149
3163
return p .CloseTx
3150
3164
}
3151
3165
3166
+ // NumberOfPendingHtlcs returns the number of pending htlcs on a pending close
3167
+ // channel.
3168
+ func (p * ChannelClosedUpdate ) NumberOfPendingHtlcs () int32 {
3169
+ return p .NumPendingHtlcs
3170
+ }
3171
+
3152
3172
// CloseChannelOption is a functional type for an option that modifies a
3153
3173
// CloseChannelRequest.
3154
3174
type CloseChannelOption func (r * lnrpc.CloseChannelRequest )
@@ -3305,7 +3325,7 @@ func (s *lightningClient) CloseChannel(ctx context.Context,
3305
3325
}
3306
3326
3307
3327
numPendingHtlcs := instantUpdate .NumPendingHtlcs
3308
- closeUpdate := & ChannelClosedUpdate {
3328
+ closeUpdate := & PendingCloseUpdate {
3309
3329
NumPendingHtlcs : numPendingHtlcs ,
3310
3330
}
3311
3331
sendUpdate (closeUpdate )
0 commit comments