Skip to content

Commit

Permalink
gossipd: handle upgrade from version 11 gossip_store
Browse files Browse the repository at this point in the history
  • Loading branch information
endothermicdev authored and rustyrussell committed Jul 26, 2023
1 parent bc59bb7 commit 4a4da00
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion gossipd/gossip_store.c
Original file line number Diff line number Diff line change
Expand Up @@ -105,10 +105,12 @@ static bool append_msg(int fd, const u8 *msg, u32 timestamp,

/* v9 added the GOSSIP_STORE_LEN_RATELIMIT_BIT.
* v10 removed any remaining non-htlc-max channel_update.
* v11 mandated channel_updates use the htlc_maximum_msat field
* v12 added the zombie flag for expired channel updates
*/
static bool can_upgrade(u8 oldversion)
{
return oldversion == 9 || oldversion == 10;
return oldversion >= 9 && oldversion <= 11;
}

static bool upgrade_field(u8 oldversion,
Expand Down

0 comments on commit 4a4da00

Please sign in to comment.