コード例 #1
0
        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);
        }
コード例 #2
0
 public void SetBestBlock()
 {
     BestBlock = new ContextBlockInformation(this.BlockResult.ChainedBlock.Previous, this.Consensus);
     Time      = DateTimeOffset.UtcNow;
 }