Skip to content

Commit

Permalink
refactor: Rename ConstructBlockHash() to ConstructHeaderHash()
Browse files Browse the repository at this point in the history
  • Loading branch information
fjahr committed Mar 12, 2024
1 parent 07c8016 commit 7e2ac74
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 3 deletions.
2 changes: 1 addition & 1 deletion src/chain.h
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ class CDiskBlockIndex : public CBlockIndex
READWRITE(obj.nNonce);
}

uint256 ConstructBlockHash() const
uint256 ConstructHeaderHash() const
{
CBlockHeader block;
block.nVersion = nVersion;
Expand Down
2 changes: 1 addition & 1 deletion src/node/blockstorage.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down
2 changes: 1 addition & 1 deletion src/test/fuzz/chain.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -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();
Expand Down

0 comments on commit 7e2ac74

Please sign in to comment.