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);
        }
Exemplo n.º 2
0
 public void SetBestBlock()
 {
     BestBlock = new ContextBlockInformation(this.BlockResult.ChainedBlock.Previous, this.Consensus);
     Time      = DateTimeOffset.UtcNow;
 }