Skip to content
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

Funder fees #4509

Merged
merged 6 commits into from
May 22, 2021
Merged

Funder fees #4509

merged 6 commits into from
May 22, 2021

Conversation

niftynei
Copy link
Collaborator

@niftynei niftynei commented May 4, 2021

Not accounting for our fees when we're calculating the total available for funding bit @fiatjaf

If a utxo isn't economical, we shouldn't add it to the transaction.

}
json_array_end(req->js);

plugin_log(cmd->plugin, LOG_DBG,
"calling `signpsbt` for channel %s",
"calling `signpsbt` for channel %s for %zu input%s",
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe there is missing space in input%s?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The last %s is for gramamtical reasons. It'll print "1 input" or "2 inputs".

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My big mistake, sorry I only take into consideration the line and not the meaning! (bad job vincent :) ).

Copy link
Collaborator

@vincenzopalazzo vincenzopalazzo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ack d2ab0b1 with only a space missing I think

Useful for asserting how many inputs we're contributing
if the utxo can't pay for its own fees, dont put it in the tx

Changelog-Changed: JSONRPC: fundpsbt will not include UTXOs that aren't economic (can't pay for their own fees), unless 'all'
Adjust our total available funds downward, to account for the fees we'll
be charged to spend them.
Make sure that 100% available actually puts in 100% of what we can add
(note that this isn't 'all' -- we don't include uneconomic utxos)
If we don't put funds into a channel, say why in the logs. Should make
it a bit easier to figure out what's going on.
If l2 didn't get FUNDING_LOCKED from l1 before it disconnected, it
won't be in state CHANNELD_NORMAL: it will be in DUALOPEND_AWAITING_LOCKIN.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
@rustyrussell
Copy link
Contributor

Ack 1d1d64e

@rustyrussell rustyrussell merged commit 4778320 into ElementsProject:master May 22, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants