lnwallet: adds selected Outpoints for funding

This commit is contained in:
Slyghtning 2023-06-10 21:27:34 +02:00
parent 50acd49283
commit d327c92188
No known key found for this signature in database
GPG key ID: F82D456EA023C9BF

View file

@ -131,6 +131,13 @@ type InitFundingReserveMsg struct {
// allocated iff the FundUpToMaxAmt is set. // allocated iff the FundUpToMaxAmt is set.
MinFundAmt btcutil.Amount MinFundAmt btcutil.Amount
// Outpoints is a list of client-selected outpoints that should be used
// for funding a channel. If LocalFundingAmt is specified then this
// amount is allocated from the sum of outpoints towards funding. If the
// FundUpToMaxAmt is specified the entirety of selected funds is
// allocated towards channel funding.
Outpoints []wire.OutPoint
// RemoteChanReserve is the channel reserve we required for the remote // RemoteChanReserve is the channel reserve we required for the remote
// peer. // peer.
RemoteChanReserve btcutil.Amount RemoteChanReserve btcutil.Amount
@ -899,6 +906,7 @@ func (l *LightningWallet) handleFundingReserveRequest(req *InitFundingReserveMsg
WalletReserve: l.RequiredReserve( WalletReserve: l.RequiredReserve(
uint32(numAnchorChans), uint32(numAnchorChans),
), ),
Outpoints: req.Outpoints,
MinConfs: req.MinConfs, MinConfs: req.MinConfs,
SubtractFees: req.SubtractFees, SubtractFees: req.SubtractFees,
FeeRate: req.FundingFeePerKw, FeeRate: req.FundingFeePerKw,