mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 23:24:27 +01:00
routing: Do not set an empty channel_announcement if none is given
Signed-off-by: Christian Decker <decker.christian@gmail.com>
This commit is contained in:
committed by
Rusty Russell
parent
4a51de44c0
commit
a0724f45af
@@ -424,9 +424,11 @@ static bool add_channel_direction(struct routing_state *rstate,
|
||||
c = half_add_connection(rstate, from, to, short_channel_id, direction);
|
||||
|
||||
/* Remember the announcement so we can forward it to new peers */
|
||||
tal_free(c->channel_announcement);
|
||||
c->channel_announcement = tal_dup_arr(c, u8, announcement,
|
||||
tal_count(announcement), 0);
|
||||
if (announcement) {
|
||||
tal_free(c->channel_announcement);
|
||||
c->channel_announcement = tal_dup_arr(c, u8, announcement,
|
||||
tal_count(announcement), 0);
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user