Skip to content
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
3 changes: 1 addition & 2 deletions plugins/xpay/xpay.c
Original file line number Diff line number Diff line change
Expand Up @@ -2457,10 +2457,9 @@ static struct command_result *handle_rpc_command(struct command *cmd,
maxdelay = t + 1;
else {
plugin_log(cmd->plugin, LOG_INFORM,
"Not redirecting pay (unknown arg %.*s)",
"Unknown arg %.*s, xpay will ignore it.",
json_tok_full_len(t),
json_tok_full(buf, t));
goto dont_redirect;
}
}
} else {
Expand Down
8 changes: 5 additions & 3 deletions tests/test_xpay.py
Original file line number Diff line number Diff line change
Expand Up @@ -450,14 +450,16 @@ def test_xpay_takeover(node_factory, executor):
inv, "10000", 'label'])
l1.daemon.wait_for_log(r'Not redirecting pay \(only handle 1 or 2 args\): ')

# Other args fail.
# Other args are ignored.
inv = l3.rpc.invoice('any', "test_xpay_takeover7", "test_xpay_takeover7")
l1.rpc.pay(inv['bolt11'], amount_msat=10000, label='test_xpay_takeover7')
l1.daemon.wait_for_log(r'Not redirecting pay \(unknown arg "label"\)')
l1.daemon.wait_for_log('Unknown arg "label", xpay will ignore it.')
l1.daemon.wait_for_log('Redirecting pay->xpay')

inv = l3.rpc.invoice('any', "test_xpay_takeover8", "test_xpay_takeover8")
l1.rpc.pay(inv['bolt11'], amount_msat=10000, riskfactor=1)
l1.daemon.wait_for_log(r'Not redirecting pay \(unknown arg "riskfactor"\)')
l1.daemon.wait_for_log('Unknown arg "riskfactor", xpay will ignore it.')
l1.daemon.wait_for_log('Redirecting pay->xpay')

# Test that it's really dynamic.
l1.rpc.setconfig('xpay-handle-pay', False)
Expand Down
Loading