mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 15:14:23 +01:00
pay: Fix a null-dereference introduced in #6428
The alias may not be set for non-alias channels after they confirm. The other branch is safe because we only consider active channels. Changelog-None Fixes #6450
This commit is contained in:
committed by
Rusty Russell
parent
f51ce7be85
commit
5f2072869a
@@ -2405,10 +2405,12 @@ local_channel_hints_listpeerchannels(struct command *cmd, const char *buffer,
|
|||||||
channel_hints_update(
|
channel_hints_update(
|
||||||
p, *chans[i]->scid, chans[i]->direction, enabled,
|
p, *chans[i]->scid, chans[i]->direction, enabled,
|
||||||
true, &chans[i]->spendable_msat, &htlc_budget);
|
true, &chans[i]->spendable_msat, &htlc_budget);
|
||||||
channel_hints_update(p, *chans[i]->alias[LOCAL],
|
if (chans[i]->alias[LOCAL] != NULL)
|
||||||
chans[i]->direction,
|
channel_hints_update(p, *chans[i]->alias[LOCAL],
|
||||||
false /* not enabled */, true,
|
chans[i]->direction,
|
||||||
&AMOUNT_MSAT(0), &htlc_budget);
|
false /* not enabled */,
|
||||||
|
true, &AMOUNT_MSAT(0),
|
||||||
|
&htlc_budget);
|
||||||
} else {
|
} else {
|
||||||
channel_hints_update(p, *chans[i]->alias[LOCAL],
|
channel_hints_update(p, *chans[i]->alias[LOCAL],
|
||||||
chans[i]->direction, enabled, true,
|
chans[i]->direction, enabled, true,
|
||||||
|
|||||||
Reference in New Issue
Block a user