subd: Do not send feerate updates to non-channeld subds

Turns out we were sending feerate updates to daemons that do not
understand it. Don't do that!

Closes #6932

Changelog-Fixed: channeld: We could crash `closingd` by sending it a `channeld` message
This commit is contained in:
Christian Decker 2023-12-12 14:13:31 +01:00
parent b0377d2323
commit a9aa93d822

View file

@ -93,6 +93,11 @@ static void try_update_feerates(struct lightningd *ld, struct channel *channel)
if (!channel->owner)
return;
/* The feerate message is only understood by `channeld` so
* don't attempt to send it to other subds*/
if (!streq(channel->owner->name, "channeld"))
return;
channel_update_feerates(ld, channel);
}