mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 07:04:22 +01:00
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:
committed by
Christian Decker
parent
26617d1d64
commit
7eea02e846
@@ -390,6 +390,9 @@ static void db_migrate(struct db *db, struct log *log)
|
|||||||
|
|
||||||
if (current == -1)
|
if (current == -1)
|
||||||
log_info(log, "Creating database");
|
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)
|
else if (current != available)
|
||||||
log_info(log, "Updating database from version %u to %u",
|
log_info(log, "Updating database from version %u to %u",
|
||||||
current, available);
|
current, available);
|
||||||
|
|||||||
Reference in New Issue
Block a user