Просмотр исходного кода

script/research/consensud/main.rs: consensus_task rename to proposal_task

aggstam 4 лет назад
Родитель
Сommit
7e8eb10e29
1 измененных файлов с 5 добавлено и 6 удалено
  1. 5 6
      script/research/consensusd/src/main.rs

+ 5 - 6
script/research/consensusd/src/main.rs

@@ -67,10 +67,9 @@ async fn api_service_init(executor: Arc<Executor<'_>>, config: &ConsensusdConfig
 
 
 /// RPCAPI:
 /// RPCAPI:
 /// Node checks if its the current slot leader and generates the slot Block (represented as a Vote structure).
 /// Node checks if its the current slot leader and generates the slot Block (represented as a Vote structure).
-/// TODO: 1, This should be a scheduled task.
-///       2. Nodes count not hard coded.
-///       3. Proposed block broadcast.
-fn consensus_task(config: &ConsensusdConfig) {
+/// TODO: 1. Nodes count not hard coded.
+///       2. Proposed block broadcast.
+fn proposal_task(config: &ConsensusdConfig) {
     let state_path = expand_path(&config.state_path).unwrap();
     let state_path = expand_path(&config.state_path).unwrap();
     let id = config.id;
     let id = config.id;
     let nodes_count = 1;
     let nodes_count = 1;
@@ -132,9 +131,9 @@ async fn main() -> Result<()> {
                 Ok::<(), darkfi::Error>(())
                 Ok::<(), darkfi::Error>(())
             })
             })
         })
         })
-        // Run the consensus task in background.
+        // Run the proposal task in background.
         .add(|| {
         .add(|| {
-            consensus_task(&config);
+            proposal_task(&config);
             drop(signal2);
             drop(signal2);
             Ok::<(), darkfi::Error>(())
             Ok::<(), darkfi::Error>(())
         })
         })