Skip to content

Commit 86e1be7

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 c3d5d59 commit 86e1be7

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
@@ -93,6 +93,11 @@ type OpenChanReq struct {
9393
// PushAmt is the amount of BTC to push to the remote peer.
9494
PushAmt btcutil.Amount
9595

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

0 commit comments

Comments
 (0)