Example #1
0
 private void Dispose(bool disposing)
 {
     if (disposing)
     {
         TimerQueryNetworkInformation.Dispose();
         TimerQueryNetworkInformation = null;
     }
 }
Example #2
0
        private void QueryNetworkInformation()
        {
            TimerQueryNetworkInformation.Stop();

            var output = HttpPostData <NetworkInformation>(HttpRpcCommands.DaemonQueryNetworkInformation);

            if (output != null && output.BlockHeightTotal != 0)
            {
                var blockHeaderLast = QueryBlockHeaderLast();
                if (blockHeaderLast != null)
                {
                    output.BlockTimeCurrent = blockHeaderLast.Timestamp;

                    NetworkInformation = output;

                    if (output.BlockHeightRemaining == 0 && !IsBlockchainSynced)
                    {
                        IsBlockchainSynced = true;
                    }
                }
            }

            TimerQueryNetworkInformation.StartOnce(TimerSettings.DaemonQueryNetworkInformationPeriod);
        }
Example #3
0
 public void Initialize()
 {
     TimerQueryNetworkInformation.StartImmediately(TimerSettings.DaemonQueryNetworkInformationPeriod);
 }