mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 06:28:31 +01:00
Merge #9014: Fix block-connection performance regression
dd0df81Document ConnectBlock connectTrace postconditions (Matt Corallo)2d6e561Switch pblock in ProcessNewBlock to a shared_ptr (Matt Corallo)2736c44Make the optional pblock in ActivateBestChain a shared_ptr (Matt Corallo)ae4db44Create a shared_ptr for the block we're connecting in ActivateBCS (Matt Corallo)fd9d890Keep blocks as shared_ptrs, instead of copying txn in ConnectTip (Matt Corallo)6fdd43bAdd struct to track block-connect-time-generated info for callbacks (Matt Corallo)
This commit is contained in:
@@ -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);
|
||||
|
||||
/**
|
||||
|
||||
Reference in New Issue
Block a user