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