//! Verification status of this block. See enum BlockStatus
unsigned int nStatus;
+ //! The anchor for the tree state up to the start of this block
+ uint256 hashAnchor;
+
//! block header
int nVersion;
uint256 hashMerkleRoot;
+ uint256 hashReserved;
unsigned int nTime;
unsigned int nBits;
- unsigned int nNonce;
+ uint256 nNonce;
+ std::vector<unsigned char> nSolution;
//! (memory only) Sequential id assigned to distinguish order in which blocks are received.
uint32_t nSequenceId;
nTx = 0;
nChainTx = 0;
nStatus = 0;
+ hashAnchor = uint256();
nSequenceId = 0;
nVersion = 0;
hashMerkleRoot = uint256();
+ hashReserved = uint256();
nTime = 0;
nBits = 0;
- nNonce = 0;
+ nNonce = uint256();
+ nSolution.clear();
}
CBlockIndex()
nVersion = block.nVersion;
hashMerkleRoot = block.hashMerkleRoot;
+ hashReserved = block.hashReserved;
nTime = block.nTime;
nBits = block.nBits;
nNonce = block.nNonce;
+ nSolution = block.nSolution;
}
CDiskBlockPos GetBlockPos() const {
if (pprev)
block.hashPrevBlock = pprev->GetBlockHash();
block.hashMerkleRoot = hashMerkleRoot;
+ block.hashReserved = hashReserved;
block.nTime = nTime;
block.nBits = nBits;
block.nNonce = nNonce;
+ block.nSolution = nSolution;
return block;
}
READWRITE(VARINT(nDataPos));
if (nStatus & BLOCK_HAVE_UNDO)
READWRITE(VARINT(nUndoPos));
+ READWRITE(hashAnchor);
// block header
READWRITE(this->nVersion);
READWRITE(hashPrev);
READWRITE(hashMerkleRoot);
+ READWRITE(hashReserved);
READWRITE(nTime);
READWRITE(nBits);
READWRITE(nNonce);
+ READWRITE(nSolution);
}
uint256 GetBlockHash() const
block.nVersion = nVersion;
block.hashPrevBlock = hashPrev;
block.hashMerkleRoot = hashMerkleRoot;
+ block.hashReserved = hashReserved;
block.nTime = nTime;
block.nBits = nBits;
block.nNonce = nNonce;
+ block.nSolution = nSolution;
return block.GetHash();
}