Skip to content
Snippets Groups Projects
Commit 3a8a14c6 authored by Éloïs's avatar Éloïs
Browse files

[fix] sync: wot_db must be save by main thread

parent fef6bfd8
Branches
Tags
1 merge request!109Resolve "Fork resolution algorithm"
......@@ -247,6 +247,10 @@ impl WotsV10DBs {
self.wot_db
.save()
.expect("Fatal error : fail to save WotDB !");
self.save_dbs_except_graph();
}
/// Save wot databases from their respective files (except wot graph)
pub fn save_dbs_except_graph(&self) {
self.identities_db
.save()
.expect("Fatal error : fail to save IdentitiesV10DB !");
......
......@@ -47,7 +47,7 @@ pub fn execute(
}
// Save wots databases
info!("Save wots databases in files...");
databases.save_dbs();
databases.save_dbs_except_graph();
// Send finish signal
sender_sync_thread
......
......@@ -401,6 +401,9 @@ pub fn local_sync<DC: DuniterConf>(profile: &str, conf: &DC, sync_opts: SyncOpt)
// Save params db
currency_params_db.save().expect("Fail to save params db");
// Save wot db
wot_databases.wot_db.save().expect("Fail to save wot db");
let main_job_duration =
SystemTime::now().duration_since(main_job_begin).unwrap() - all_wait_duration;
info!(
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment