Switch pblock in ProcessNewBlock to a shared_ptr

This (finally) fixes a performance regression in
b3b3c2a562
This commit is contained in:
Matt Corallo
2016-12-04 00:17:30 -08:00
parent 2736c44c8e
commit 2d6e5619af
6 changed files with 20 additions and 21 deletions

View File

@@ -233,7 +233,7 @@ static const uint64_t MIN_DISK_SPACE_FOR_BLOCK_FILES = 550 * 1024 * 1024;
* @param[out] fNewBlock A boolean which is set to indicate if the block was first received via this call
* @return True if state.IsValid()
*/
bool ProcessNewBlock(const CChainParams& chainparams, const CBlock* pblock, bool fForceProcessing, const CDiskBlockPos* dbp, bool* fNewBlock);
bool ProcessNewBlock(const CChainParams& chainparams, const std::shared_ptr<const CBlock> pblock, bool fForceProcessing, const CDiskBlockPos* dbp, bool* fNewBlock);
/**
* Process incoming block headers.