Within the supply code for the CBlockHeader
magnificence, there’s a box known as nBits
.
/** Nodes acquire new transactions right into a block, hash them right into a hash tree,
* and scan via nonce values to make the block's hash fulfill proof-of-work
* necessities. After they remedy the proof-of-work, they broadcast the block
* to everybody and the block is added to the block chain. The primary transaction
* within the block is a different person who creates a brand new coin owned by means of the author
* of the block.
*/
magnificence CBlockHeader
{
public:
// header
int32_t nVersion;
uint256 hashPrevBlock;
uint256 hashMerkleRoot;
uint32_t nTime;
uint32_t nBits;
uint32_t nNonce;
So far as I searched within the code, I did not discovered any remark for this box. However I noticed the CheckBlockHeader
serve as the usage of the nBits
box to test evidence of labor of the block. So I interpret that it is a illustration of the trouble for the block.
static bool CheckBlockHeader(const CBlockHeader& block, BlockValidationState& state, const Consensus::Params& consensusParams, bool fCheckPOW = true)
{
// Test evidence of labor fits claimed quantity
if (fCheckPOW && !CheckProofOfWork(block.GetHash(), block.nBits, consensusParams))
go back state.Invalid(BlockValidationResult::BLOCK_INVALID_HEADER, "high-hash", "evidence of labor failed");
go back true;
}
Is my figuring out right kind?