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

add a funder plugin #4489

Merged
merged 20 commits into from
May 3, 2021
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
5065f41
libplugin: add no-op command complete function
niftynei Apr 19, 2021
2001b1f
tests: remove EXPERIMENTAL_FEATURE flag from openchannel2 hooks
niftynei Apr 20, 2021
536d032
plugin-tests: cleanup outdated openchannel2 hook fields
niftynei Apr 20, 2021
a7ef21e
dualopend: don't use final channel_id for accepter_start2
niftynei Apr 20, 2021
5d47c67
openchannel2: add channel_max_msat to openchannel2 hook payload
niftynei Apr 20, 2021
dea5f2d
psbt-open: method to quickly check if has our input
niftynei Apr 21, 2021
e489b66
openchannel2/rbf hooks: reject if response malformed
niftynei Apr 21, 2021
c88f307
dualfund: set the locktime for the user-provided PSBT
niftynei Apr 21, 2021
890ac99
openchannel: add missing string args to format string
niftynei Apr 21, 2021
d8534e7
amount: `amount_sat_scale` method
niftynei Apr 23, 2021
e4eef8e
funder: add a plugin, `funder`. policies for dual-funding
niftynei Apr 22, 2021
e13b310
funder: use listfunds to fetch utxo data
niftynei Apr 23, 2021
86eb1e0
funder-test: tests for our policy configurations
niftynei Apr 22, 2021
45e87a9
contrib: if you're in dev mode, use dual-funding (with matching)
niftynei Apr 23, 2021
ec846cd
funder: sanitize inputs
niftynei Apr 22, 2021
9795006
funder: `funderupdate` command to see/set configs
niftynei Apr 22, 2021
d97ef4d
rbf_channel hook: add channel_max_msat parameter
niftynei Apr 23, 2021
1e0f05f
funder: handle RBF callback
niftynei Apr 23, 2021
884f1d4
pyln-testing: use provided outnum instead of trying to find it
niftynei Apr 29, 2021
de9102a
tests: add test for funder options
niftynei Apr 27, 2021
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions plugins/libplugin.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,6 +106,10 @@ struct command_result *command_param_failed(void)
return &complete;
}

struct command_result *command_done(void)
{
return &complete;
}

static void ld_send(struct plugin *plugin, struct json_stream *stream)
{
Expand Down
4 changes: 4 additions & 0 deletions plugins/libplugin.h
Original file line number Diff line number Diff line change
Expand Up @@ -219,6 +219,10 @@ struct command_result *forward_result(struct command *cmd,
* send_req() path. */
struct command_result *timer_complete(struct plugin *p);

/* Signals that we've completed a command. Useful for when
* there's no `cmd` present */
struct command_result *command_done(void);

Copy link
Contributor

Choose a reason for hiding this comment

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

Drop this commit. The one place you end up using it, you do indeed have a command. You just don't use it!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I don't want to actually do anything with the command though. There's no response to send on our side when this completes, it's a 'silent no-op'?

Copy link
Contributor

Choose a reason for hiding this comment

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

OK, this is because the "cmd" is actually a notification, which doesn't want a response. It does, however, want to be freed!

I'll submit a followup PR which cleans this up everywhere...

/* Access timer infrastructure to add a timer.
*
* Freeing this releases the timer, otherwise it's freed after @cb
Expand Down