mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-21 08:04:26 +01:00
Fixed assertion in pay plugin
This PR includes the fix discussed on PR #3855. This fix was tested with the use case described inside the issue and worked. Fixes: #3855 Changelog-None
This commit is contained in:
@@ -1622,7 +1622,8 @@ local_channel_hints_listpeers(struct command *cmd, const char *buffer,
|
|||||||
spendsats = json_get_member(buffer, channel, "spendable_msat");
|
spendsats = json_get_member(buffer, channel, "spendable_msat");
|
||||||
scid = json_get_member(buffer, channel, "short_channel_id");
|
scid = json_get_member(buffer, channel, "short_channel_id");
|
||||||
dir = json_get_member(buffer, channel, "direction");
|
dir = json_get_member(buffer, channel, "direction");
|
||||||
assert(spendsats != NULL && scid != NULL && dir != NULL);
|
if(spendsats == NULL || scid == NULL || dir == NULL)
|
||||||
|
continue;
|
||||||
|
|
||||||
json_to_bool(buffer, connected, &h.enabled);
|
json_to_bool(buffer, connected, &h.enabled);
|
||||||
json_to_short_channel_id(buffer, scid, &h.scid.scid);
|
json_to_short_channel_id(buffer, scid, &h.scid.scid);
|
||||||
|
|||||||
@@ -3157,7 +3157,6 @@ def test_mpp_adaptive(node_factory, bitcoind):
|
|||||||
pprint(l1.rpc.paystatus(inv))
|
pprint(l1.rpc.paystatus(inv))
|
||||||
|
|
||||||
|
|
||||||
@pytest.mark.xfail(strict=True)
|
|
||||||
def test_pay_fail_unconfirmed_channel(node_factory, bitcoind):
|
def test_pay_fail_unconfirmed_channel(node_factory, bitcoind):
|
||||||
'''
|
'''
|
||||||
Replicate #3855.
|
Replicate #3855.
|
||||||
|
|||||||
Reference in New Issue
Block a user