mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-20 23:54:22 +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");
|
||||
scid = json_get_member(buffer, channel, "short_channel_id");
|
||||
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_short_channel_id(buffer, scid, &h.scid.scid);
|
||||
|
||||
Reference in New Issue
Block a user