private void Dispose(bool disposing) { if (disposing) { TimerQueryNetworkInformation.Dispose(); TimerQueryNetworkInformation = null; } }
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); }
public void Initialize() { TimerQueryNetworkInformation.StartImmediately(TimerSettings.DaemonQueryNetworkInformationPeriod); }