lightning
lightning copied to clipboard
Should plugins/bkpr/db.c also follow db_upgrade_ok?
Since #5550 CLN gained a safety feature where it refuses to upgrade database version unless you explicitly tell it to do so while running a non-release branch.
wallet/db.c contains
else if (current != available) {
if (ld->db_upgrade_ok && *ld->db_upgrade_ok == false) {
db_fatal("Refusing to upgrade db from version %u to %u (database-upgrade=false)",
current, available);
} else if (!ld->db_upgrade_ok && !is_released_version()) {
db_fatal("Refusing to irreversibly upgrade db from version %u to %u in non-final version %s (use --database-upgrade=true to override)",
current, available, version());
}
log_info(ld->log, "Updating database from version %u to %u",
current, available);
}
plugins/bkpr/db.c has a similar database upgrade but no safety check.
2022-09-25T19:44:51.695Z INFO plugin-bookkeeper: Updating database from version 14 to 15
Should the plugin also check?