diff --git a/src/chain.h b/src/chain.h index ac1f8c519..a89f05dac 100644 --- a/src/chain.h +++ b/src/chain.h @@ -292,7 +292,7 @@ public: return block; } - uint256 GetBlockHash() const + const uint256& GetBlockHash() const { return hash; } diff --git a/src/txdb.cpp b/src/txdb.cpp index 473fee9ce..47d1ee182 100644 --- a/src/txdb.cpp +++ b/src/txdb.cpp @@ -315,11 +315,12 @@ bool CBlockTreeDB::BatchWrite(const std::vectorGetBlockHash() << (bi->pprev ? bi->pprev->GetBlockHash() : uint256()) + ibi << bi->hash << (bi->pprev ? bi->pprev->hash : empty) << bi->nHeight << bi->nFile << bi->nDataPos << bi->nUndoPos << bi->nTx << bi->nStatus << bi->nVersion << bi->hashMerkleRoot << bi->hashClaimTrie << bi->nTime << bi->nBits << bi->nNonce;