mirror of
https://github.com/bitcoin/bitcoin.git
synced 2025-11-11 06:28:31 +01:00
Merge #9499: Use recent-rejects, orphans, and recently-replaced txn for compact-block-reconstruction
c594580Add braces around AddToCompactExtraTransactions (Matt Corallo)1ccfe9bClarify comment about mempool/extra conflicts (Matt Corallo)fac4c78Make PartiallyDownloadedBlock::InitData's second param const (Matt Corallo)b55b416Add extra_count lower bound to compact reconstruction debug print (Matt Corallo)863edb4Consider all (<100k memusage) txn for compact-block-extra-txn cache (Matt Corallo)7f8c8caConsider all orphan txn for compact-block-extra-txn cache (Matt Corallo)93380c5Use replaced transactions in compact block reconstruction (Matt Corallo)1531652Keep shared_ptrs to recently-replaced txn for compact blocks (Matt Corallo)edded80Make ATMP optionally return the CTransactionRefs it replaced (Matt Corallo)c735540Move ORPHAN constants from validation.h to net_processing.h (Matt Corallo)
This commit is contained in:
@@ -59,12 +59,6 @@ static const CAmount DEFAULT_TRANSACTION_MAXFEE = 0.1 * COIN;
|
||||
static const CAmount HIGH_TX_FEE_PER_KB = 0.01 * 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;
|
||||
/** 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 */
|
||||
static const int64_t ORPHAN_TX_EXPIRE_TIME = 20 * 60;
|
||||
/** Minimum time between orphan transactions expire time checks in seconds */
|
||||
static const int64_t ORPHAN_TX_EXPIRE_INTERVAL = 5 * 60;
|
||||
/** Default for -limitancestorcount, max number of in-mempool ancestors */
|
||||
static const unsigned int DEFAULT_ANCESTOR_LIMIT = 25;
|
||||
/** Default for -limitancestorsize, maximum kilobytes of tx + all in-mempool ancestors */
|
||||
@@ -319,13 +313,16 @@ void PruneAndFlush();
|
||||
/** Prune block files up to a given height */
|
||||
void PruneBlockFilesManual(int nPruneUpToHeight);
|
||||
|
||||
/** (try to) add transaction to memory pool **/
|
||||
/** (try to) add transaction to memory pool
|
||||
* plTxnReplaced will be appended to with all transactions replaced from mempool **/
|
||||
bool AcceptToMemoryPool(CTxMemPool& pool, CValidationState &state, const CTransactionRef &tx, bool fLimitFree,
|
||||
bool* pfMissingInputs, bool fOverrideMempoolLimit=false, const CAmount nAbsurdFee=0);
|
||||
bool* pfMissingInputs, std::list<CTransactionRef>* plTxnReplaced = NULL,
|
||||
bool fOverrideMempoolLimit=false, const CAmount nAbsurdFee=0);
|
||||
|
||||
/** (try to) add transaction to memory pool with a specified acceptance time **/
|
||||
bool AcceptToMemoryPoolWithTime(CTxMemPool& pool, CValidationState &state, const CTransactionRef &tx, bool fLimitFree,
|
||||
bool* pfMissingInputs, int64_t nAcceptTime, bool fOverrideMempoolLimit=false, const CAmount nAbsurdFee=0);
|
||||
bool* pfMissingInputs, int64_t nAcceptTime, std::list<CTransactionRef>* plTxnReplaced = NULL,
|
||||
bool fOverrideMempoolLimit=false, const CAmount nAbsurdFee=0);
|
||||
|
||||
/** Convert CValidationState to a human-readable message for logging */
|
||||
std::string FormatStateMessage(const CValidationState &state);
|
||||
|
||||
Reference in New Issue
Block a user