Skip to content

Commit

Permalink
subd: Do not send feerate updates to non-channeld subds
Browse files Browse the repository at this point in the history
Turns out we were sending feerate updates to daemons that do not
understand it. Don't do that!

Closes ElementsProject#6932

Changelog-Fixed: channeld: We could crash `closingd` by sending it a `channeld` message
  • Loading branch information
cdecker authored and yaslama committed Dec 13, 2023
1 parent 5887be0 commit 443c0c6
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lightningd/channel_control.c
Original file line number Diff line number Diff line change
Expand Up @@ -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);
}

Expand Down

0 comments on commit 443c0c6

Please sign in to comment.