update main
This commit is contained in:
505
src/main.cpp
505
src/main.cpp
File diff suppressed because it is too large
Load Diff
40
src/main.h
40
src/main.h
@@ -10,16 +10,21 @@
|
||||
#define BITCOIN_MAIN_H
|
||||
|
||||
#if defined(HAVE_CONFIG_H)
|
||||
#include "config/bitcoin-config.h"
|
||||
#include <config/bitcoin-config.h>
|
||||
#endif
|
||||
|
||||
#include "amount.h"
|
||||
#include "chain.h"
|
||||
#include "coins.h"
|
||||
#include "net.h"
|
||||
#include "script/script_error.h"
|
||||
#include "sync.h"
|
||||
#include "versionbits.h"
|
||||
#include <amount.h>
|
||||
#include <chain.h>
|
||||
#include <coins.h>
|
||||
#include <net.h>
|
||||
#include <script/interpreter.h>
|
||||
#include <script/script_error.h>
|
||||
#include <sync.h>
|
||||
#include <versionbits.h>
|
||||
#include <wallet/walletdb.h>
|
||||
#include <txdb.h>
|
||||
#include <consensus/consensus.h>
|
||||
|
||||
|
||||
#include <algorithm>
|
||||
#include <exception>
|
||||
@@ -58,7 +63,7 @@ static const CAmount DEFAULT_TRANSACTION_MAXFEE = 1 * COIN;
|
||||
//! Discourage users to set fees higher than this amount (in satoshis) per kB
|
||||
static const CAmount HIGH_TX_FEE_PER_KB = 0.1 * COIN;
|
||||
//! -maxtxfee will warn if called with a higher fee than this amount (in satoshis)
|
||||
static const CAmount HIGH_MAX_TX_FEE = 100 * HIGH_TX_FEE_PER_KB;
|
||||
static const CAmount HIGH_MAX_TX_FEE = 100 * HIGH_TX_FEE_PER_KB;
|
||||
/** Default for -maxorphantx, maximum number of orphan transactions kept in memory */
|
||||
static const unsigned int DEFAULT_MAX_ORPHAN_TRANSACTIONS = 100;
|
||||
/** Expiration time for orphan transactions in seconds */
|
||||
@@ -195,7 +200,7 @@ extern int64_t nMaxTipAge;
|
||||
extern CBlockIndex *pindexBestHeader;
|
||||
|
||||
/** Minimum disk space required - used in CheckDiskSpace() */
|
||||
static const uint64_t nMinDiskSpace = 52428800;
|
||||
static const uint64_t nMinDiskSpace = 104857600;
|
||||
|
||||
/** Pruning-related variables and constants */
|
||||
/** True if any block files have ever been pruned. */
|
||||
@@ -225,12 +230,12 @@ void RegisterNodeSignals(CNodeSignals& nodeSignals);
|
||||
/** Unregister a network node */
|
||||
void UnregisterNodeSignals(CNodeSignals& nodeSignals);
|
||||
|
||||
/**
|
||||
/**
|
||||
* Process an incoming block. This only returns after the best known valid
|
||||
* block is made active. Note that it does not, however, guarantee that the
|
||||
* specific block passed to it has been checked for validity!
|
||||
*
|
||||
* @param[out] state This may be set to an Error state if any error occurred processing it, including during validation/connection/etc of otherwise unrelated blocks during reorganization; or it may be set to an Invalid state if pblock is itself invalid (but this is not guaranteed even when the block is checked). If you want to *possibly* get feedback on whether pblock is valid, you must also install a CValidationInterface (see validationinterface.h) - this will have its BlockChecked method called whenever *any* block completes validation.
|
||||
*
|
||||
* @param[out] state This may be set to an Error state if any error occurred processing it, including during validation/connection/etc of otherwise unrelated blocks during reorganisation; or it may be set to an Invalid state if pblock is itself invalid (but this is not guaranteed even when the block is checked). If you want to *possibly* get feedback on whether pblock is valid, you must also install a CValidationInterface (see validationinterface.h) - this will have its BlockChecked method called whenever *any* block completes validation.
|
||||
* @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.
|
||||
* @param[in] pblock The block we want to process.
|
||||
* @param[in] fForceProcessing Process this block even if unrequested; used for non-network block sources and whitelisted peers.
|
||||
@@ -331,9 +336,7 @@ struct CNodeStateStats {
|
||||
std::vector<int> vHeightInFlight;
|
||||
};
|
||||
|
||||
|
||||
|
||||
/**
|
||||
/**
|
||||
* Count ECDSA signature operations the old-fashioned (pre-0.6) way
|
||||
* @return number of sigops this transaction's outputs will produce when spent
|
||||
* @see CTransaction::FetchInputs
|
||||
@@ -342,7 +345,7 @@ unsigned int GetSigOpCountWithoutP2SH(const CTransaction& tx);
|
||||
|
||||
/**
|
||||
* Count ECDSA signature operations in pay-to-script-hash inputs.
|
||||
*
|
||||
*
|
||||
* @param[in] mapInputs Map of previous transactions that have outputs we're spending
|
||||
* @return maximum number of sigops required to validate this transaction's inputs
|
||||
* @see CTransaction::FetchInputs
|
||||
@@ -413,7 +416,7 @@ bool CheckSequenceLocks(const CTransaction &tx, int flags, LockPoints* lp = NULL
|
||||
|
||||
/**
|
||||
* Closure representing one script verification
|
||||
* Note that this stores references to the spending transaction
|
||||
* Note that this stores references to the spending transaction
|
||||
*/
|
||||
class CScriptCheck
|
||||
{
|
||||
@@ -513,6 +516,7 @@ extern CCoinsViewCache *pcoinsTip;
|
||||
|
||||
/** Global variable that points to the active block tree (protected by cs_main) */
|
||||
extern CBlockTreeDB *pblocktree;
|
||||
extern uint256 hashBestChain;
|
||||
|
||||
/**
|
||||
* Return the spend height, which is one more than the inputs.GetBestBlock().
|
||||
|
||||
Reference in New Issue
Block a user