Exemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the object with parent block puller.
 /// </summary>
 /// <param name="puller">Reference to the parent block puller.</param>
 /// <param name="loggerFactory">Factory to be used to create logger for the puller.</param>
 public BlockPullerBehavior(BlockPuller puller, ILoggerFactory loggerFactory)
 {
     this.puller        = puller;
     this.QualityScore  = BlockPulling.QualityScore.MaxScore / 3;
     this.logger        = loggerFactory.CreateLogger(this.GetType().FullName, $"[{this.GetHashCode():x}] ");
     this.loggerFactory = loggerFactory;
 }
Exemplo n.º 2
0
 public BlockPullerBehavior(BlockPuller puller)
 {
     this.puller            = puller;
     this.cancellationToken = new CancellationTokenSource();
     this.pendingDownloads  = new ConcurrentDictionary <uint256, uint256>();
     this.QualityScore      = 75;
 }
 /// <summary>
 /// Initializes a new instance of the object with parent block puller.
 /// </summary>
 /// <param name="puller">Reference to the parent block puller.</param>
 /// <param name="loggerFactory">Factory to be used to create logger for the puller.</param>
 public BlockPullerBehavior(BlockPuller puller, ILoggerFactory loggerFactory)
 {
     this.puller       = puller;
     this.QualityScore = BlockPulling.QualityScore.MaxScore / 3;
     // TODO: https://github.com/stratisproject/StratisBitcoinFullNode/issues/292
     this.logger        = loggerFactory.CreateLogger(this.GetType().FullName);
     this.loggerFactory = loggerFactory;
 }
Exemplo n.º 4
0
 public BlockPullerBehavior(BlockPuller puller)
 {
     this.puller       = puller;
     this.QualityScore = 75;
 }