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

lightningd: remove things we deprecated 6 months ago. #3471

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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: 2 additions & 2 deletions lightningd/peer_htlcs.c
Original file line number Diff line number Diff line change
Expand Up @@ -2179,15 +2179,15 @@ void json_format_forwarding_object(struct json_stream *response,
json_add_short_channel_id(response, "in_channel", &cur->channel_in);

/* This can be unknown if we failed before channel lookup */
if (cur->channel_out.u64 != 0 || deprecated_apis)
if (cur->channel_out.u64 != 0)
json_add_short_channel_id(response, "out_channel",
&cur->channel_out);
json_add_amount_msat_compat(response,
cur->msat_in,
"in_msatoshi", "in_msat");

/* These can be unset (aka zero) if we failed before channel lookup */
if (cur->channel_out.u64 != 0 || deprecated_apis) {
if (cur->channel_out.u64 != 0) {
json_add_amount_msat_compat(response,
cur->msat_out,
"out_msatoshi", "out_msat");
Expand Down
17 changes: 0 additions & 17 deletions lightningd/plugin.c
Original file line number Diff line number Diff line change
Expand Up @@ -69,23 +69,6 @@ struct plugin *plugin_register(struct plugins *plugins, const char* path TAKES)
p->plugins = plugins;
p->cmd = tal_strdup(p, path);

/* Fix up old-style relative paths */
if (deprecated_apis
&& !path_is_abs(p->cmd)
&& access(p->cmd, X_OK) != 0) {
char *oldpath = path_join(tmpctx,
plugins->ld->original_directory,
p->cmd);
if (access(oldpath, X_OK) == 0) {
log_unusual(plugins->log, "DEPRECATED WARNING:"
" plugin is now relative to"
" lightning-dir, please change to"
" plugin=%s",
oldpath);
tal_free(p->cmd);
p->cmd = tal_steal(p, oldpath);
}
}
p->plugin_state = UNCONFIGURED;
p->js_arr = tal_arr(p, struct json_stream *, 0);
p->used = 0;
Expand Down
19 changes: 0 additions & 19 deletions tests/test_plugin.py
Original file line number Diff line number Diff line change
Expand Up @@ -710,25 +710,6 @@ def test_forward_event_notification(node_factory, bitcoind, executor):
assert plugin_stats[5] == expect


def test_plugin_deprecated_relpath(node_factory):
"""Test that we can use old-style relative plugin paths with deprecated-apis"""
l1 = node_factory.get_node(options={'plugin-dir': 'contrib/plugins',
'plugin': 'tests/plugins/millisatoshis.py',
'allow-deprecated-apis': True})

plugins = l1.rpc.plugin_list()['plugins']
assert ('helloworld.py', True) in [(os.path.basename(p['name']), p['active']) for p in plugins]
assert ('millisatoshis.py', True) in [(os.path.basename(p['name']), p['active']) for p in plugins]

assert l1.daemon.is_in_log('DEPRECATED WARNING.*plugin-dir={}'
.format(os.path.join(os.getcwd(),
'contrib/plugins')))

assert l1.daemon.is_in_log('DEPRECATED WARNING.*plugin={}'
.format(os.path.join(os.getcwd(),
'tests/plugins/millisatoshis.py')))


def test_sendpay_notifications(node_factory, bitcoind):
""" test 'sendpay_success' and 'sendpay_failure' notifications
"""
Expand Down