aboutsummaryrefslogtreecommitdiff
path: root/src/validation.h
diff options
context:
space:
mode:
authorcodeShark149 <rajarshi149@gmail.com>2020-05-24 18:28:56 +0530
committergzhao408 <gzhao408@berkeley.edu>2020-09-15 18:01:32 -0700
commit2233a93a109b10b6fe0f5f26c2bb529c8de3dde7 (patch)
tree254b829dc0e2ed876388e4ec9f81c36c26d0cf26 /src/validation.h
parent9366a73d695136fec8de12d3942254543903c0cd (diff)
[rpc] Return fee and vsize from testmempoolaccept
Return fee and vsize if tx would pass ATMP.
Diffstat (limited to 'src/validation.h')
-rw-r--r--src/validation.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/validation.h b/src/validation.h
index 53c2dd65e5..0bc80e1cee 100644
--- a/src/validation.h
+++ b/src/validation.h
@@ -199,10 +199,11 @@ void UnlinkPrunedFiles(const std::set<int>& setFilesToPrune);
void PruneBlockFilesManual(int nManualPruneHeight);
/** (try to) add transaction to memory pool
- * plTxnReplaced will be appended to with all transactions replaced from mempool **/
+ * plTxnReplaced will be appended to with all transactions replaced from mempool
+ * @param[out] fee_out optional argument to return tx fee to the caller **/
bool AcceptToMemoryPool(CTxMemPool& pool, TxValidationState &state, const CTransactionRef &tx,
std::list<CTransactionRef>* plTxnReplaced,
- bool bypass_limits, const CAmount nAbsurdFee, bool test_accept=false) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
+ bool bypass_limits, const CAmount nAbsurdFee, bool test_accept=false, CAmount* fee_out=nullptr) EXCLUSIVE_LOCKS_REQUIRED(cs_main);
/** Get the BIP9 state for a given deployment at the current tip. */
ThresholdState VersionBitsTipState(const Consensus::Params& params, Consensus::DeploymentPos pos);