Skip to content

Commit c536fa0

Browse files
committed
lightningd: injectpaymentonion can use scids of unannounced channels.
Cut & paste from the forwarding code, where we don't let onions use the unannounced scids. Obviously local commands can use them. Reported-by: @michael1011 Changelog-Fixed: JSON-RPC: xpay now works through unannounced channels.
1 parent 5694f1e commit c536fa0

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

lightningd/pay.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1985,7 +1985,7 @@ static struct command_result *json_injectpaymentonion(struct command *cmd,
19851985
if (payload->forward_channel) {
19861986
next = any_channel_by_scid(cmd->ld,
19871987
*payload->forward_channel,
1988-
false);
1988+
true);
19891989
if (!next)
19901990
return command_fail(cmd, JSONRPC2_INVALID_PARAMS,
19911991
"Unknown scid %s",

tests/test_xpay.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -532,7 +532,6 @@ def test_xpay_maxfee(node_factory, bitcoind, chainparams):
532532
assert fee <= maxfee
533533

534534

535-
@pytest.mark.xfail(strict=True)
536535
def test_xpay_unannounced(node_factory):
537536
l1, l2 = node_factory.line_graph(2, announce_channels=False)
538537

0 commit comments

Comments
 (0)