gossipd: don't resurrect deleted half_chans

fixes #5989

Changelog-None
This commit is contained in:
Alex Myers 2023-02-09 17:52:07 -06:00 committed by Alex Myers
parent a610f28ad4
commit 822db6acc2
1 changed files with 2 additions and 1 deletions

View File

@ -1524,7 +1524,8 @@ bool routing_add_channel_update(struct routing_state *rstate,
/* Handle resurrection of zombie channels if the other side of the
* zombie channel has a recent timestamp. */
if (zombie && timestamp_reasonable(rstate,
chan->half[!direction].bcast.timestamp)) {
chan->half[!direction].bcast.timestamp) &&
chan->half[!direction].bcast.index) {
status_peer_debug(peer ? &peer->id : NULL,
"Resurrecting zombie channel %s.",
type_to_string(tmpctx,