diff --git a/src/chain.h b/src/chain.h index fa165a4aa732e9..d8a5a716760036 100644 --- a/src/chain.h +++ b/src/chain.h @@ -426,7 +426,7 @@ class CDiskBlockIndex : public CBlockIndex READWRITE(obj.nNonce); } - uint256 ConstructBlockHash() const + uint256 ConstructHeaderHash() const { CBlockHeader block; block.nVersion = nVersion; diff --git a/src/node/blockstorage.cpp b/src/node/blockstorage.cpp index cb2b2913e3d162..cb612079425071 100644 --- a/src/node/blockstorage.cpp +++ b/src/node/blockstorage.cpp @@ -116,7 +116,7 @@ bool BlockTreeDB::LoadBlockIndexGuts(const Consensus::Params& consensusParams, s CDiskBlockIndex diskindex; if (pcursor->GetValue(diskindex)) { // Construct block index object - CBlockIndex* pindexNew = insertBlockIndex(diskindex.ConstructBlockHash()); + CBlockIndex* pindexNew = insertBlockIndex(diskindex.ConstructHeaderHash()); pindexNew->pprev = insertBlockIndex(diskindex.hashPrev); pindexNew->nHeight = diskindex.nHeight; pindexNew->nFile = diskindex.nFile; diff --git a/src/test/fuzz/chain.cpp b/src/test/fuzz/chain.cpp index 0363f317b63f99..a164039026574e 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->ConstructBlockHash(); + (void)disk_block_index->ConstructHeaderHash(); (void)disk_block_index->GetBlockPos(); (void)disk_block_index->GetBlockTime(); (void)disk_block_index->GetBlockTimeMax();