funding: add fundmax flag to OpenChannelRequest (funding)
https://github.com/lightningnetwork/lnd/pull/6903
Host: Crypt-IQ -
Notes
- The majority of the code change is in the
lnwallet/chanfundingpackage. The flow for opening channels at the code-level is, roughly,rpcserver.go->funding/manager.go->lnwallet. User-specified parameters such as fundmax will reach thelnwalletcode through this path. - Check out the channel funding coin selection logic in
lnwallet/chanfunding/coin_select.go - Consider checking out
itest/lnd_channel_funding_fund_max_test.goto have a good overview of fundmax behavior.
Questions
Questions:
- Did you review the PR and, if so, what’s your overall verdict? (ACK, NACK, concept ACK, unknown, mega-NACK, tACK)
- Did you test the PR and, if so, how did you find the fundmax option?
- Could it use more documentation on the cli?
- Did anything break?
- What is the problem that fundmax is trying to solve?
- Why do we disallow setting
LocalFundingAmtandFundMax? - Why do we disallow setting a psbt with
FundMax? - Why do we disable
fundmaxforCannedAssemblerandPsbtAssembler? - In
lnwallet/chanfunding/coin_select.go:- What does the
CoinSelectfunction do? - What does the
CoinSelectSubtractFeesfunction do?- How does
CoinSelectdiffer fromCoinSelectSubtractFees?
- How does
- What does the
CoinSelectUpToAmountfunction do?- How does
CoinSelectUpToAmountdiffer from the previous two functions?
- How does
- What does the
- In
lnwallet/chanfunding/assembler.go:- What role does
RemoteChanReserveplay in theRequeststruct? - What about
WalletReserve?
- What role does