Skip to content

Commit d4576f4

Browse files
committed
psbt_channel_funder+tapchannel: add remote max HTLC
We want to be able to dictate how many HTLCs the remote side can add to the channel we create. We'll do the same for the responder side with a channel acceptor in one of the following commits.
1 parent bdfd80f commit d4576f4

File tree

2 files changed

+6
-0
lines changed

2 files changed

+6
-0
lines changed

psbt_channel_funder.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -110,6 +110,7 @@ func (l *LndPbstChannelFunder) OpenChannel(ctx context.Context,
110110
},
111111
}),
112112
lndclient.WithRemoteReserve(CustomChannelRemoteReserve),
113+
lndclient.WithRemoteMaxHtlc(req.RemoteMaxHtlc),
113114
)
114115
if err != nil {
115116
return nil, fmt.Errorf("unable to open channel with "+

tapchannel/aux_funding_controller.go

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,11 @@ type OpenChanReq struct {
9494
// PushAmt is the amount of BTC to push to the remote peer.
9595
PushAmt btcutil.Amount
9696

97+
// RemoteMaxHtlc is the maximum number of HTLCs we allow the remote to
98+
// add to the channel. If this is zero, then the default value defined
99+
// by lnd (and dependent on the channel capacity) will be used.
100+
RemoteMaxHtlc uint32
101+
97102
// PeerPub is the identity public key of the remote peer we wish to
98103
// open the channel with.
99104
PeerPub btcec.PublicKey

0 commit comments

Comments
 (0)