diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/chain.h | 3 | ||||
-rw-r--r-- | src/test/fuzz/chain.cpp | 2 | ||||
-rw-r--r-- | src/txdb.cpp | 2 |
3 files changed, 4 insertions, 3 deletions
diff --git a/src/chain.h b/src/chain.h index 251471befb..6b2e4367e9 100644 --- a/src/chain.h +++ b/src/chain.h @@ -403,7 +403,7 @@ public: READWRITE(obj.nNonce); } - uint256 GetBlockHash() const + uint256 ConstructBlockHash() const { CBlockHeader block; block.nVersion = nVersion; @@ -415,6 +415,7 @@ public: return block.GetHash(); } + uint256 GetBlockHash() = delete; std::string ToString() = delete; }; diff --git a/src/test/fuzz/chain.cpp b/src/test/fuzz/chain.cpp index 1d6b5f30db..01edb06138 100644 --- a/src/test/fuzz/chain.cpp +++ b/src/test/fuzz/chain.cpp @@ -23,7 +23,7 @@ FUZZ_TARGET(chain) disk_block_index->phashBlock = &zero; { LOCK(::cs_main); - (void)disk_block_index->GetBlockHash(); + (void)disk_block_index->ConstructBlockHash(); (void)disk_block_index->GetBlockPos(); (void)disk_block_index->GetBlockTime(); (void)disk_block_index->GetBlockTimeMax(); diff --git a/src/txdb.cpp b/src/txdb.cpp index c048c2d92a..bad3bb80a9 100644 --- a/src/txdb.cpp +++ b/src/txdb.cpp @@ -310,7 +310,7 @@ bool CBlockTreeDB::LoadBlockIndexGuts(const Consensus::Params& consensusParams, CDiskBlockIndex diskindex; if (pcursor->GetValue(diskindex)) { // Construct block index object - CBlockIndex* pindexNew = insertBlockIndex(diskindex.GetBlockHash()); + CBlockIndex* pindexNew = insertBlockIndex(diskindex.ConstructBlockHash()); pindexNew->pprev = insertBlockIndex(diskindex.hashPrev); pindexNew->nHeight = diskindex.nHeight; pindexNew->nFile = diskindex.nFile; |