Skip to content

Commit 5650b36

Browse files
author
barrystyle
committed
rename functions/operands appropriately
1 parent 9b07d64 commit 5650b36

File tree

3 files changed

+7
-7
lines changed

3 files changed

+7
-7
lines changed

src/miner.cpp

+2-2
Original file line numberDiff line numberDiff line change
@@ -975,9 +975,9 @@ void BitcoinMiner(std::shared_ptr<CReserveScript> coinbaseScript, bool fProofOfS
975975
}
976976
pblock->mixHash = mix_hash;
977977
} else if (pblock->IsSha256D() && pblock->nTime >= Params().PowUpdateTimestamp()) {
978-
uint256 localDataHash = pblock->GetDataHash();
978+
uint256 midStateHash = pblock->GetSha256dMidstate();
979979
while (nTries < nInnerLoopCount &&
980-
!CheckProofOfWork(pblock->GetSha256D(localDataHash), pblock->nBits,
980+
!CheckProofOfWork(pblock->GetSha256D(midStateHash), pblock->nBits,
981981
Params().GetConsensus(), CBlockHeader::SHA256D_BLOCK)) {
982982
boost::this_thread::interruption_point();
983983
++nTries;

src/primitives/block.cpp

+3-3
Original file line numberDiff line numberDiff line change
@@ -53,15 +53,15 @@ uint256 CBlockHeader::GetSha256DPoWHash() const
5353
return SerializeHash(sha256Final);
5454
}
5555

56-
uint256 CBlockHeader::GetDataHash() const
56+
uint256 CBlockHeader::GetSha256dMidstate() const
5757
{
5858
CSha256dDataInput input(*this);
5959
return SerializeHash(input);
6060
}
6161

62-
uint256 CBlockHeader::GetSha256D(uint256& dataHash) const
62+
uint256 CBlockHeader::GetSha256D(uint256& midState) const
6363
{
64-
CSha256dInput sha256Final(*this, dataHash);
64+
CSha256dInput sha256Final(*this, midState);
6565
return SerializeHash(sha256Final);
6666
}
6767

src/primitives/block.h

+2-2
Original file line numberDiff line numberDiff line change
@@ -198,8 +198,8 @@ class CBlockHeader
198198
uint256 GetX16RTPoWHash(bool fSetVeilDataHashNull = false) const;
199199
uint256 GetSha256DPoWHash() const;
200200

201-
uint256 GetDataHash() const;
202-
uint256 GetSha256D(uint256& dataHash) const;
201+
uint256 GetSha256dMidstate() const;
202+
uint256 GetSha256D(uint256& midState) const;
203203

204204
uint256 GetProgPowHeaderHash() const;
205205
uint256 GetRandomXHeaderHash() const;

0 commit comments

Comments
 (0)