Browse Source

db: don't allow newer db versions.

Clearly we could do more damage if we continue.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
ppa-0.6.1
Rusty Russell 7 years ago
committed by Christian Decker
parent
commit
7eea02e846
  1. 3
      wallet/db.c

3
wallet/db.c

@ -390,6 +390,9 @@ static void db_migrate(struct db *db, struct log *log)
if (current == -1)
log_info(log, "Creating database");
else if (available < current)
fatal("Refusing to migrate down from version %u to %u",
current, available);
else if (current != available)
log_info(log, "Updating database from version %u to %u",
current, available);

Loading…
Cancel
Save