Skip to content

Commit

Permalink
psbt_channel_funder+tapchannel: add remote max HTLC
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
guggero committed Oct 29, 2024
1 parent bdfd80f commit d4576f4
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions psbt_channel_funder.go
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,7 @@ func (l *LndPbstChannelFunder) OpenChannel(ctx context.Context,
},
}),
lndclient.WithRemoteReserve(CustomChannelRemoteReserve),
lndclient.WithRemoteMaxHtlc(req.RemoteMaxHtlc),
)
if err != nil {
return nil, fmt.Errorf("unable to open channel with "+
Expand Down
5 changes: 5 additions & 0 deletions tapchannel/aux_funding_controller.go
Original file line number Diff line number Diff line change
Expand Up @@ -94,6 +94,11 @@ type OpenChanReq struct {
// PushAmt is the amount of BTC to push to the remote peer.
PushAmt btcutil.Amount

// RemoteMaxHtlc is the maximum number of HTLCs we allow the remote to
// add to the channel. If this is zero, then the default value defined
// by lnd (and dependent on the channel capacity) will be used.
RemoteMaxHtlc uint32

// PeerPub is the identity public key of the remote peer we wish to
// open the channel with.
PeerPub btcec.PublicKey
Expand Down

0 comments on commit d4576f4

Please sign in to comment.