public ContextInformation(ChainedBlock nextBlock, NBitcoin.Consensus consensus)
        {
            Guard.NotNull(nextBlock, nameof(nextBlock));

            BestBlock        = new ContextBlockInformation(nextBlock.Previous, consensus);
            Time             = DateTimeOffset.UtcNow;
            NextWorkRequired = nextBlock.GetWorkRequired(consensus);
        }
Exemple #2
0
 public ContextInformation(ChainedBlock nextBlock, NBitcoin.Consensus consensus)
 {
     if (nextBlock == null)
     {
         throw new ArgumentNullException("nextBlock");
     }
     BestBlock        = new ContextBlockInformation(nextBlock.Previous, consensus);
     Time             = DateTimeOffset.UtcNow;
     NextWorkRequired = nextBlock.GetWorkRequired(consensus);
 }