Example #1
0
 private void OnStart()
 {
     Log("OnStart");
     started = true;
     if (!dbftSettings.IgnoreRecoveryLogs && context.Load())
     {
         if (context.Transactions != null)
         {
             blockchain.Ask <Blockchain.FillCompleted>(new Blockchain.FillMemoryPool
             {
                 Transactions = context.Transactions.Values
             }).Wait();
         }
         if (context.CommitSent)
         {
             CheckPreparations();
             return;
         }
     }
     InitializeConsensus(0);
     // Issue a ChangeView with NewViewNumber of 0 to request recovery messages on start-up.
     if (!context.WatchOnly)
     {
         RequestRecovery();
     }
 }