mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-12 23:18:14 +01:00
Merge pull request #7053
2e29e7e Globals: Remove a bunch of Params() calls from main.cpp: (Jorge Timón)
This commit is contained in:
13
src/main.h
13
src/main.h
@@ -170,9 +170,9 @@ FILE* OpenUndoFile(const CDiskBlockPos &pos, bool fReadOnly = false);
|
||||
/** Translation to a filesystem path */
|
||||
boost::filesystem::path GetBlockPosFilename(const CDiskBlockPos &pos, const char *prefix);
|
||||
/** Import blocks from an external file */
|
||||
bool LoadExternalBlockFile(FILE* fileIn, CDiskBlockPos *dbp = NULL);
|
||||
bool LoadExternalBlockFile(const CChainParams& chainparams, FILE* fileIn, CDiskBlockPos *dbp = NULL);
|
||||
/** Initialize a new block tree database + block data on disk */
|
||||
bool InitBlockIndex();
|
||||
bool InitBlockIndex(const CChainParams& chainparams);
|
||||
/** Load the block tree and coins database from disk */
|
||||
bool LoadBlockIndex();
|
||||
/** Unload database information */
|
||||
@@ -197,7 +197,7 @@ std::string GetWarnings(const std::string& strFor);
|
||||
/** Retrieve a transaction (from memory pool, or from disk, if possible) */
|
||||
bool GetTransaction(const uint256 &hash, CTransaction &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 CBlock *pblock = NULL);
|
||||
bool ActivateBestChain(CValidationState& state, const CChainParams& chainparams, const CBlock* pblock = NULL);
|
||||
CAmount GetBlockSubsidy(int nHeight, const Consensus::Params& consensusParams);
|
||||
|
||||
/**
|
||||
@@ -215,7 +215,7 @@ CAmount GetBlockSubsidy(int nHeight, const Consensus::Params& consensusParams);
|
||||
*
|
||||
* @param[out] setFilesToPrune The set of file indices that can be unlinked will be returned
|
||||
*/
|
||||
void FindFilesToPrune(std::set<int>& setFilesToPrune);
|
||||
void FindFilesToPrune(std::set<int>& setFilesToPrune, uint64_t nPruneAfterHeight);
|
||||
|
||||
/**
|
||||
* Actually unlink the specified files
|
||||
@@ -381,9 +381,6 @@ bool ContextualCheckBlock(const CBlock& block, CValidationState& state, CBlockIn
|
||||
/** Check a block is completely valid from start to finish (only works on top of our current best block, with cs_main held) */
|
||||
bool TestBlockValidity(CValidationState& state, const CChainParams& chainparams, const CBlock& block, CBlockIndex* pindexPrev, bool fCheckPOW = true, bool fCheckMerkleRoot = true);
|
||||
|
||||
/** Store block on disk. If dbp is non-NULL, the file is known to already reside on disk */
|
||||
bool AcceptBlock(const CBlock& block, CValidationState& state, CBlockIndex **pindex, bool fRequested, CDiskBlockPos* dbp);
|
||||
|
||||
|
||||
class CBlockFileInfo
|
||||
{
|
||||
@@ -444,7 +441,7 @@ class CVerifyDB {
|
||||
public:
|
||||
CVerifyDB();
|
||||
~CVerifyDB();
|
||||
bool VerifyDB(CCoinsView *coinsview, int nCheckLevel, int nCheckDepth);
|
||||
bool VerifyDB(const CChainParams& chainparams, CCoinsView *coinsview, int nCheckLevel, int nCheckDepth);
|
||||
};
|
||||
|
||||
/** Find the last common block between the parameter chain and a locator. */
|
||||
|
||||
Reference in New Issue
Block a user