mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 15:14:23 +01:00
plugins/pay: hand bolt11 arg to sendonion if we have one (i.e. for pay)
[ Extracted into standalone patch and comment added by RR ]
This commit is contained in:
committed by
Christian Decker
parent
71a2aefafd
commit
81fd552e84
@@ -28,6 +28,7 @@ struct payment *payment_new(tal_t *ctx, struct command *cmd,
|
|||||||
p->route = NULL;
|
p->route = NULL;
|
||||||
p->temp_exclusion = NULL;
|
p->temp_exclusion = NULL;
|
||||||
p->failroute_retry = false;
|
p->failroute_retry = false;
|
||||||
|
p->bolt11 = NULL;
|
||||||
|
|
||||||
/* Copy over the relevant pieces of information. */
|
/* Copy over the relevant pieces of information. */
|
||||||
if (parent != NULL) {
|
if (parent != NULL) {
|
||||||
@@ -1040,6 +1041,9 @@ static struct command_result *payment_createonion_success(struct command *cmd,
|
|||||||
if (p->label)
|
if (p->label)
|
||||||
json_add_string(req->js, "label", p->label);
|
json_add_string(req->js, "label", p->label);
|
||||||
|
|
||||||
|
if (p->bolt11)
|
||||||
|
json_add_string(req->js, "bolt11", p->bolt11);
|
||||||
|
|
||||||
send_outreq(p->plugin, req);
|
send_outreq(p->plugin, req);
|
||||||
return command_still_pending(cmd);
|
return command_still_pending(cmd);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -3195,7 +3195,6 @@ def test_pay_fail_unconfirmed_channel(node_factory, bitcoind):
|
|||||||
l1.rpc.pay(invl2)
|
l1.rpc.pay(invl2)
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.xfail(strict=True)
|
|
||||||
def test_bolt11_null_after_pay(node_factory, bitcoind):
|
def test_bolt11_null_after_pay(node_factory, bitcoind):
|
||||||
l1, l2 = node_factory.get_nodes(2)
|
l1, l2 = node_factory.get_nodes(2)
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user