aboutsummaryrefslogtreecommitdiff
path: root/src/validation.h
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2016-12-05 08:07:22 +0100
committerWladimir J. van der Laan <laanwj@gmail.com>2016-12-05 08:07:45 +0100
commitd04aebaec7bbf4095bd4f6a715eb6ee834857115 (patch)
tree170bba16ee5e0dda0b027d9e545f645ce8a9f950 /src/validation.h
parent46904ee5d2ce867b522a582b23e1ac6735179e5c (diff)
parentdd0df81ebdbf705f7ad386c7229bf1bbc3125f62 (diff)
downloadbitcoin-d04aebaec7bbf4095bd4f6a715eb6ee834857115.tar.xz
Merge #9014: Fix block-connection performance regression
dd0df81 Document ConnectBlock connectTrace postconditions (Matt Corallo) 2d6e561 Switch pblock in ProcessNewBlock to a shared_ptr (Matt Corallo) 2736c44 Make the optional pblock in ActivateBestChain a shared_ptr (Matt Corallo) ae4db44 Create a shared_ptr for the block we're connecting in ActivateBCS (Matt Corallo) fd9d890 Keep blocks as shared_ptrs, instead of copying txn in ConnectTip (Matt Corallo) 6fdd43b Add struct to track block-connect-time-generated info for callbacks (Matt Corallo)
Diffstat (limited to 'src/validation.h')
-rw-r--r--src/validation.h4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/validation.h b/src/validation.h
index f242c20ab9..28e81d21c6 100644
--- a/src/validation.h
+++ b/src/validation.h
@@ -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.
@@ -278,7 +278,7 @@ std::string GetWarnings(const std::string& strFor);
/** Retrieve a transaction (from memory pool, or from disk, if possible) */
bool GetTransaction(const uint256 &hash, CTransactionRef &tx, const Consensus::Params& params, uint256 &hashBlock, bool fAllowSlow = false);
/** Find the best known block, and make it the tip of the block chain */
-bool ActivateBestChain(CValidationState& state, const CChainParams& chainparams, const CBlock* pblock = NULL);
+bool ActivateBestChain(CValidationState& state, const CChainParams& chainparams, std::shared_ptr<const CBlock> pblock = std::shared_ptr<const CBlock>());
CAmount GetBlockSubsidy(int nHeight, const Consensus::Params& consensusParams);
/**