@@ -769,15 +769,21 @@ type ForceCloseAnchorState int32
769
769
const (
770
770
// ForceCloseAnchorStateLimbo is set if the recovered_balance is zero
771
771
// and limbo_balance is non-zero.
772
- ForceCloseAnchorStateLimbo = ForceCloseAnchorState (lnrpc .PendingChannelsResponse_ForceClosedChannel_LIMBO )
772
+ ForceCloseAnchorStateLimbo = ForceCloseAnchorState (
773
+ lnrpc .PendingChannelsResponse_ForceClosedChannel_LIMBO ,
774
+ )
773
775
774
776
// ForceCloseAnchorStateRecovered is set if the recovered_balance is
775
777
// non-zero.
776
- ForceCloseAnchorStateRecovered = ForceCloseAnchorState (lnrpc .PendingChannelsResponse_ForceClosedChannel_RECOVERED )
778
+ ForceCloseAnchorStateRecovered = ForceCloseAnchorState (
779
+ lnrpc .PendingChannelsResponse_ForceClosedChannel_RECOVERED ,
780
+ )
777
781
778
782
// ForceCloseAnchorStateLost indicates a state that is neither
779
783
// ForceCloseAnchorStateLimbo nor ForceCloseAnchorStateRecovered.
780
- ForceCloseAnchorStateLost = ForceCloseAnchorState (lnrpc .PendingChannelsResponse_ForceClosedChannel_LOST )
784
+ ForceCloseAnchorStateLost = ForceCloseAnchorState (
785
+ lnrpc .PendingChannelsResponse_ForceClosedChannel_LOST ,
786
+ )
781
787
)
782
788
783
789
// String provides the string representation of a close initiator.
@@ -2157,7 +2163,8 @@ type WaitingCloseChannel struct {
2157
2163
RemotePending chainhash.Hash
2158
2164
2159
2165
// ChanStatusFlags specifies the current channel state, examples:
2160
- // - ChanStatusBorked|ChanStatusCommitBroadcasted|ChanStatusLocalCloseInitiator
2166
+ // - ChanStatusBorked|ChanStatusCommitBroadcasted|
2167
+ // ChanStatusLocalCloseInitiator
2161
2168
// - ChanStatusCoopBroadcasted|ChanStatusLocalCloseInitiator
2162
2169
// - ChanStatusCoopBroadcasted|ChanStatusRemoteCloseInitiator
2163
2170
ChanStatusFlags string
@@ -2167,8 +2174,8 @@ type WaitingCloseChannel struct {
2167
2174
}
2168
2175
2169
2176
// PendingChannels returns a list of lnd's pending channels.
2170
- func (s * lightningClient ) PendingChannels (ctx context. Context ) ( * PendingChannels ,
2171
- error ) {
2177
+ func (s * lightningClient ) PendingChannels (
2178
+ ctx context. Context ) ( * PendingChannels , error ) {
2172
2179
2173
2180
rpcCtx , cancel := context .WithTimeout (ctx , s .timeout )
2174
2181
defer cancel ()
@@ -2182,9 +2189,16 @@ func (s *lightningClient) PendingChannels(ctx context.Context) (*PendingChannels
2182
2189
}
2183
2190
2184
2191
pending := & PendingChannels {
2185
- PendingForceClose : make ([]ForceCloseChannel , len (resp .PendingForceClosingChannels )),
2186
- PendingOpen : make ([]PendingChannel , len (resp .PendingOpenChannels )),
2187
- WaitingClose : make ([]WaitingCloseChannel , len (resp .WaitingCloseChannels )),
2192
+ PendingForceClose : make (
2193
+ []ForceCloseChannel ,
2194
+ len (resp .PendingForceClosingChannels ),
2195
+ ),
2196
+ PendingOpen : make (
2197
+ []PendingChannel , len (resp .PendingOpenChannels ),
2198
+ ),
2199
+ WaitingClose : make (
2200
+ []WaitingCloseChannel , len (resp .WaitingCloseChannels ),
2201
+ ),
2188
2202
}
2189
2203
2190
2204
for i , force := range resp .PendingForceClosingChannels {
@@ -3053,8 +3067,8 @@ func (s *lightningClient) getOpenStatusUpdate(
3053
3067
// OpenChannelStream opens a channel to the specified peer and with the
3054
3068
// specified arguments and options. This function returns a stream of
3055
3069
// updates.
3056
- func (s * lightningClient ) OpenChannelStream (ctx context.Context , peer route. Vertex ,
3057
- localSat , pushSat btcutil.Amount , private bool ,
3070
+ func (s * lightningClient ) OpenChannelStream (ctx context.Context ,
3071
+ peer route. Vertex , localSat , pushSat btcutil.Amount , private bool ,
3058
3072
opts ... OpenChannelOption ) (<- chan * OpenStatusUpdate , <- chan error ,
3059
3073
error ) {
3060
3074
@@ -3288,6 +3302,7 @@ func (s *lightningClient) CloseChannel(ctx context.Context,
3288
3302
return updateChan , errChan , nil
3289
3303
}
3290
3304
3305
+ // InboundFee holds the inbound fee policy for a channel.
3291
3306
type InboundFee struct {
3292
3307
// BaseFeeMsat is the inbound base fee charged regardless of the number
3293
3308
// of milli-satoshis received in the channel. By default, only negative
0 commit comments