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>
This commit is contained in:
parent
26617d1d64
commit
7eea02e846
|
@ -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…
Reference in New Issue