소스 검색

darkirc: update event_graph synced flag when we skip sync

aggstam 2 년 전
부모
커밋
b1821df428
2개의 변경된 파일3개의 추가작업 그리고 1개의 파일을 삭제
  1. 2 0
      bin/darkirc/src/main.rs
  2. 1 1
      src/event_graph/mod.rs

+ 2 - 0
bin/darkirc/src/main.rs

@@ -288,6 +288,8 @@ async fn realmain(args: Args, ex: Arc<Executor<'static>>) -> Result<()> {
                 }
                 }
             }
             }
         }
         }
+    } else {
+        *event_graph.synced.write().await = true;
     }
     }
 
 
     // Signal handling for graceful termination.
     // Signal handling for graceful termination.

+ 1 - 1
src/event_graph/mod.rs

@@ -94,7 +94,7 @@ pub struct EventGraph {
     /// Currently configured DAG rotation, in days
     /// Currently configured DAG rotation, in days
     days_rotation: u64,
     days_rotation: u64,
     /// Flag signalling DAG has finished initial sync
     /// Flag signalling DAG has finished initial sync
-    synced: RwLock<bool>,
+    pub synced: RwLock<bool>,
 }
 }
 
 
 impl EventGraph {
 impl EventGraph {