public Checkpoint(string checkpointName, Network network, Stream data, CloudBlockBlob blob, ILoggerFactory loggerFactory) { this.loggerFactory = loggerFactory; this.logger = loggerFactory.CreateLogger(GetType().FullName); if (checkpointName == null) { throw new ArgumentNullException("checkpointName"); } _Blob = blob; _CheckpointName = checkpointName; _BlockLocator = new BlockLocator(); if (data != null) { try { _BlockLocator.ReadWrite(data, false); return; } catch { } } var list = new List <uint256>(); list.Add(network.GetGenesis().Header.GetHash()); _BlockLocator = new BlockLocator(); _BlockLocator.Blocks.AddRange(list); }
public Checkpoint(string checkpointName, Network network, Stream data, CloudBlockBlob blob) { if (checkpointName == null) { throw new ArgumentNullException("checkpointName"); } _Blob = blob; _CheckpointName = checkpointName; _BlockLocator = new BlockLocator(); if (data != null) { try { _BlockLocator.ReadWrite(data, false, network); return; } catch { } } var list = new List <uint256>(); list.Add(network.GetGenesis().Header.GetHash()); _BlockLocator = new BlockLocator(); _BlockLocator.Blocks.AddRange(list); }