2using System.Collections.Generic;
11 private readonly List<KeyValuePair<string, string>> blockErrorsMessages =
new List<KeyValuePair<string, string>>();
12 private DateTime first = DateTime.MaxValue;
13 private DateTime last = DateTime.MinValue;
14 private uint nrBlocks = 0;
15 private uint nrNew = 0;
16 private uint nrUpdated = 0;
17 private uint nrLoaded = 0;
18 private uint nrDenied = 0;
19 private uint blockErrors = 0;
20 private uint objectErrors = 0;
21 private ulong totalBytes = 0;
22 private ulong loadedBytes = 0;
23 private ulong events = 0;
24 private ulong objectsAdded = 0;
25 private ulong objectsDeleted = 0;
26 private ulong objectsUpdated = 0;
27 private bool done =
false;
42 internal set => this.first = value;
51 internal set => this.last = value;
60 internal set => this.nrBlocks = value;
69 internal set => this.nrNew = value;
77 get => this.nrUpdated;
78 internal set => this.nrUpdated = value;
87 internal set => this.nrLoaded = value;
96 internal set => this.nrDenied = value;
104 get => this.blockErrors;
112 internal void IncBlockError(
string Peer,
string Message)
114 this.IncBlockError(Peer, Message, 1);
123 internal void IncBlockError(
string Peer,
string Message, uint
NrBlocks)
125 lock (this.blockErrorsMessages)
128 this.blockErrorsMessages.Add(
new KeyValuePair<string, string>(Peer, Message));
138 KeyValuePair<string, string>[] Result;
140 lock (this.blockErrorsMessages)
142 if (this.blockErrorsMessages.Count == 0)
146 Result = this.blockErrorsMessages.ToArray();
147 this.blockErrorsMessages.Clear();
159 get => this.objectErrors;
160 internal set => this.objectErrors = value;
168 get => this.totalBytes;
169 internal set => this.totalBytes = value;
177 get => this.loadedBytes;
178 internal set => this.loadedBytes = value;
187 internal set => this.events = value;
195 get => this.objectsAdded;
196 internal set => this.objectsAdded = value;
204 get => this.objectsUpdated;
205 internal set => this.objectsUpdated = value;
213 get => this.objectsDeleted;
214 internal set => this.objectsDeleted = value;
223 internal set => this.done = value;
uint NrBlocks
Number of blocks processed
bool Done
If synchronization process is completed.
DateTime First
Earliest block
uint NrNew
Number of new blocks
ulong TotalBytes
Total number of bytes
ulong ObjectsDeleted
Objects deleted
DateTime Last
Latest block
uint BlockErrors
Number of block errors.
uint NrDenied
Number of blocks denied access to.
ulong ObjectsAdded
Objects added
ulong ObjectsUpdated
Objects updated
KeyValuePair< string, string >[] PopBlockErrorMessages()
Returns the latest block error messages reported.
ulong LoadedBytes
Total number of loaded bytes
uint ObjectErrors
Number of object errors.
SynchronizationStatus()
Synchronization status.
uint NrUpdated
Number of updated blocks
uint NrLoaded
Number of blocks loaded