-
Notifications
You must be signed in to change notification settings - Fork 2.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add argument to OpenChannel rpc to input UTXOs #6955
Comments
@saubyk As mentioned in #6949 I'd like to take a shot at this issue. One thought regarding Scenario 2.
|
I agree with making things as explicit as possible. Otherwise it might happen that I forget |
I am working on tests for edge-cases in the coin selection and wanted to get your thoughts on the following scenario. Suppose we have two coins in our wallet, say |
Sounds like the expected behavior, yes. So the check for the anchor reserve should take into account the full wallet balance and not only the selected UTXOs. |
Ok, it sounds obvious. I was asking this in the context of the |
To simplify app development for coin selection on channel opens an additional argument should be added to the
OpenChannel
rpc. This argument should take an array of UTXOs which the application (user) passes. The processing logic should also include fee estimation, which enables complete UTXO consumption with no change output being generated.Two scenarios to explain the requirement.
Scenario 1: User selects coins to use and specifies the amount to open the channel with. This can result in a change output being generated depending upon the amount in coins and fee rate chosen (essentially same as current functionality but with selected UTXOs)
The
OpenChannel
rpc will be called with:utxo
argumentScenario 2: User selects coins to use and indicates to use them whole. This should result in no change output.
The
OpenChannel
rpc will be called with:utxo
argumentfundmax
flag as trueThe scope of change includes:
fundmax
flag is introduced with the below pr:#6903
Related issue:
#6949
The text was updated successfully, but these errors were encountered: