diff options
author | Matt Corallo <git@bluematt.me> | 2016-12-04 18:53:26 -0800 |
---|---|---|
committer | Matt Corallo <git@bluematt.me> | 2017-01-09 14:15:18 -0500 |
commit | edded808fc4eee94c178e1779b90d1c87a08c23a (patch) | |
tree | a12312fa8616361dca5ca877a4d8e580892c19bc /src/validation.h | |
parent | c73554042886fb63fb48edf29cf827951edde341 (diff) |
Make ATMP optionally return the CTransactionRefs it replaced
Diffstat (limited to 'src/validation.h')
-rw-r--r-- | src/validation.h | 9 |
1 files changed, 6 insertions, 3 deletions
diff --git a/src/validation.h b/src/validation.h index 7848c787aa..0c79ed30b7 100644 --- a/src/validation.h +++ b/src/validation.h @@ -304,13 +304,16 @@ void FlushStateToDisk(); /** Prune block files and flush state to disk. */ void PruneAndFlush(); -/** (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); |