Skip to content

Commit 2ca756d

Browse files
Remove unnecessary references
1 parent 935a72b commit 2ca756d

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

src/pow.cpp

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -26,15 +26,15 @@ static inline const CBlockIndex* GetLastBlockIndex(const CBlockIndex* pindex, co
2626
return pindex;
2727
}
2828

29-
static inline const CBlockIndex* GetLastBlockIndexForAlgo(const CBlockIndex* pindex, const int& algo)
29+
static inline const CBlockIndex* GetLastBlockIndexForAlgo(const CBlockIndex* pindex, const int algo)
3030
{
3131
while (pindex && CBlockHeader::GetAlgoType(pindex->nVersion) != algo && pindex->pprev) {
3232
pindex = pindex->pprev;
3333
}
3434
return pindex;
3535
}
3636

37-
static inline const CBlockIndex* GetASERTReferenceBlockForAlgo(const CBlockIndex* pindex, const int& nASERTStartHeight, const int& algo)
37+
static inline const CBlockIndex* GetASERTReferenceBlockForAlgo(const CBlockIndex* pindex, const int nASERTStartHeight, const int algo)
3838
{
3939
if (!pindex)
4040
return pindex;
@@ -52,7 +52,7 @@ static inline const CBlockIndex* GetASERTReferenceBlockForAlgo(const CBlockIndex
5252

5353
// Note that calling this function as part of the difficulty calculation for every block results in a time complexity of O(n^2)
5454
// with respect to the number of blocks in the chain as it must count back to the reference block each time it is called while syncing
55-
/*static inline const CBlockIndex* GetASERTReferenceBlockAndHeightForAlgo(const CBlockIndex* pindex, const uint32_t& nProofOfWorkLimit, const int& nASERTStartHeight, const int& algo, uint32_t& nBlocksPassed)
55+
/*static inline const CBlockIndex* GetASERTReferenceBlockAndHeightForAlgo(const CBlockIndex* pindex, const uint32_t nProofOfWorkLimit, const int nASERTStartHeight, const int algo, uint32_t& nBlocksPassed)
5656
{
5757
nBlocksPassed = 1; // Account for the ASERT reference block here
5858
@@ -404,7 +404,7 @@ unsigned int AverageTargetASERT(const CBlockIndex* pindexLast, const CBlockHeade
404404
return bnNew.GetCompactRoundedBase256();
405405
}
406406

407-
bool CheckProofOfWork(const uint256& hash, const unsigned int& nBits, const int& algo, const Consensus::Params& params)
407+
bool CheckProofOfWork(const uint256& hash, const unsigned int nBits, const int algo, const Consensus::Params& params)
408408
{
409409
bool fNegative;
410410
bool fOverflow;

src/pow.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,6 @@ unsigned int WeightedTargetExponentialMovingAverage(const CBlockIndex* pindexLas
2222
unsigned int AverageTargetASERT(const CBlockIndex* pindexLast, const CBlockHeader *pblock, const Consensus::Params&);
2323

2424
/** Check whether a block hash satisfies the proof-of-work requirement specified by nBits */
25-
bool CheckProofOfWork(const uint256& hash, const unsigned int& nBits, const int& algo, const Consensus::Params&);
25+
bool CheckProofOfWork(const uint256& hash, const unsigned int nBits, const int algo, const Consensus::Params&);
2626

2727
#endif // BITCOIN_POW_H

0 commit comments

Comments
 (0)