Add some const declarations where they are appropriate.

Declare some arguments of functions as "const" pointers where they are
not meant to be modified.
This commit is contained in:
Daniel Kraft
2015-08-08 18:18:41 +02:00
parent c0f66ce44a
commit 69c3bde448
4 changed files with 15 additions and 15 deletions

View File

@@ -352,7 +352,7 @@ CBlockTemplate* CreateNewBlock(const CScript& scriptPubKeyIn)
return pblocktemplate.release();
}
void IncrementExtraNonce(CBlock* pblock, CBlockIndex* pindexPrev, unsigned int& nExtraNonce)
void IncrementExtraNonce(CBlock* pblock, const CBlockIndex* pindexPrev, unsigned int& nExtraNonce)
{
// Update nExtraNonce
static uint256 hashPrevBlock;
@@ -409,7 +409,7 @@ bool static ScanHash(const CBlockHeader *pblock, uint32_t& nNonce, uint256 *phas
}
}
static bool ProcessBlockFound(CBlock* pblock, const CChainParams& chainparams)
static bool ProcessBlockFound(const CBlock* pblock, const CChainParams& chainparams)
{
LogPrintf("%s\n", pblock->ToString());
LogPrintf("generated %s\n", FormatMoney(pblock->vtx[0].vout[0].nValue));