Make recalc_fingerprints a bool

This commit is contained in:
Alexander Krotov
2019-12-15 18:47:10 +01:00
committed by holger krekel
parent 256bb01606
commit a34ed5c02a

View File

@@ -544,7 +544,7 @@ fn open(
// -------------------------------------------------------------------- // --------------------------------------------------------------------
let mut dbversion = dbversion_before_update; let mut dbversion = dbversion_before_update;
let mut recalc_fingerprints = 0; let mut recalc_fingerprints = false;
let mut update_icons = false; let mut update_icons = false;
if dbversion < 1 { if dbversion < 1 {
@@ -687,7 +687,7 @@ fn open(
"CREATE INDEX acpeerstates_index4 ON acpeerstates (gossip_key_fingerprint);", "CREATE INDEX acpeerstates_index4 ON acpeerstates (gossip_key_fingerprint);",
params![], params![],
)?; )?;
recalc_fingerprints = 1; recalc_fingerprints = true;
dbversion = 34; dbversion = 34;
sql.set_raw_config_int(context, "dbversion", 34)?; sql.set_raw_config_int(context, "dbversion", 34)?;
} }
@@ -872,7 +872,7 @@ fn open(
// (the structure is complete now and all objects are usable) // (the structure is complete now and all objects are usable)
// -------------------------------------------------------------------- // --------------------------------------------------------------------
if 0 != recalc_fingerprints { if recalc_fingerprints {
info!(context, "[migration] recalc fingerprints"); info!(context, "[migration] recalc fingerprints");
sql.query_map( sql.query_map(
"SELECT addr FROM acpeerstates;", "SELECT addr FROM acpeerstates;",