Skip to content

Commit d253ec4

Browse files
committed
Make ProcessNewBlock dbp const and update comment
1 parent b3e42b6 commit d253ec4

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/main.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3398,7 +3398,7 @@ static bool AcceptBlockHeader(const CBlockHeader& block, CValidationState& state
33983398
}
33993399

34003400
/** Store block on disk. If dbp is non-NULL, the file is known to already reside on disk */
3401-
static bool AcceptBlock(const CBlock& block, CValidationState& state, const CChainParams& chainparams, CBlockIndex** ppindex, bool fRequested, CDiskBlockPos* dbp)
3401+
static bool AcceptBlock(const CBlock& block, CValidationState& state, const CChainParams& chainparams, CBlockIndex** ppindex, bool fRequested, const CDiskBlockPos* dbp)
34023402
{
34033403
AssertLockHeld(cs_main);
34043404

@@ -3474,7 +3474,7 @@ static bool IsSuperMajority(int minVersion, const CBlockIndex* pstart, unsigned
34743474
}
34753475

34763476

3477-
bool ProcessNewBlock(CValidationState& state, const CChainParams& chainparams, const CNode* pfrom, const CBlock* pblock, bool fForceProcessing, CDiskBlockPos* dbp)
3477+
bool ProcessNewBlock(CValidationState& state, const CChainParams& chainparams, const CNode* pfrom, const CBlock* pblock, bool fForceProcessing, const CDiskBlockPos* dbp)
34783478
{
34793479
{
34803480
LOCK(cs_main);

src/main.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -212,10 +212,10 @@ void UnregisterNodeSignals(CNodeSignals& nodeSignals);
212212
* @param[in] pfrom The node which we are receiving the block from; it is added to mapBlockSource and may be penalised if the block is invalid.
213213
* @param[in] pblock The block we want to process.
214214
* @param[in] fForceProcessing Process this block even if unrequested; used for non-network block sources and whitelisted peers.
215-
* @param[out] dbp If pblock is stored to disk (or already there), this will be set to its location.
215+
* @param[out] dbp The already known disk position of pblock, or NULL if not yet stored.
216216
* @return True if state.IsValid()
217217
*/
218-
bool ProcessNewBlock(CValidationState& state, const CChainParams& chainparams, const CNode* pfrom, const CBlock* pblock, bool fForceProcessing, CDiskBlockPos* dbp);
218+
bool ProcessNewBlock(CValidationState& state, const CChainParams& chainparams, const CNode* pfrom, const CBlock* pblock, bool fForceProcessing, const CDiskBlockPos* dbp);
219219
/** Check whether enough disk space is available for an incoming block */
220220
bool CheckDiskSpace(uint64_t nAdditionalBytes = 0);
221221
/** Open a block file (blk?????.dat) */

0 commit comments

Comments
 (0)