/** Nodes collect new transactions into a block, hash them into a hash tree, * and scan through nonce values to make the block's hash satisfy proof-of-work * requirements. When they solve the proof-of-work, they broadcast the block * to everyone and the block is added to the block chain. The first transaction * in the block is a special one that creates a new coin owned by the creator * of the block. * ------------- * 网络中的节点不断收集新的交易,然后以一个Merkle树的形式打包进区块block中, * 打包的过程就是要完成工作量证明的要求,当节点解出了当前的随机数时, * 网络就把当前的区块广播到其他所有节点,并且加到区块链上。 * 区块中的第一笔交易称之为CoinBase交易,是产生的新币,发送给区块的产生者 */ class CBlockHeader //区块头 类 { public: // header int32_t nVersion; //版本号 uint256 hashPrevBlock; //前一个区块的哈希 uint256 hashMerkleRoot; //Merkle 树根 uint32_t nTime; //时间戳 uint32_t nBits; //POW难度 uint32_t nNonce; //要找的随机数