mirror of
https://github.com/aljazceru/lightning.git
synced 2026-01-11 01:54:25 +01:00
pay: specify the channel to send the first hop.
If we only specify the node_id, we get the "first" channel. Closes: #5803 Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> Changelog-Fixed: Plugins: `pay` uses the correct local channel for payments when there are multiple available (not just always the first!)
This commit is contained in:
@@ -1573,6 +1573,7 @@ static struct command_result *payment_createonion_success(struct command *cmd,
|
||||
json_add_amount_msat_only(req->js, "amount_msat", first->amount);
|
||||
json_add_num(req->js, "delay", first->delay);
|
||||
json_add_node_id(req->js, "id", &first->node_id);
|
||||
json_add_short_channel_id(req->js, "channel", &first->scid);
|
||||
json_object_end(req->js);
|
||||
|
||||
json_add_sha256(req->js, "payment_hash", p->payment_hash);
|
||||
|
||||
@@ -5305,7 +5305,6 @@ def test_payerkey(node_factory):
|
||||
assert n.rpc.decode(b12)['invreq_payer_id'] == k
|
||||
|
||||
|
||||
@pytest.mark.xfail(strict=True)
|
||||
def test_cln_sendpay_weirdness(bitcoind, node_factory):
|
||||
# 0. Setup
|
||||
|
||||
|
||||
Reference in New Issue
Block a user