aboutsummaryrefslogtreecommitdiff
path: root/src/txmempool.h
diff options
context:
space:
mode:
authorglozow <gloriajzhao@gmail.com>2023-04-16 09:05:01 +0100
committerglozow <gloriajzhao@gmail.com>2023-05-10 21:10:44 +0100
commit9e9ca36c80013749faaf2aa777d52bd07d9d24ec (patch)
tree0e595739215e1b54bec44298e2782a66d6bce9ce /src/txmempool.h
parentccd4db7d62e4880005da49f820a520a8943dcaed (diff)
downloadbitcoin-9e9ca36c80013749faaf2aa777d52bd07d9d24ec.tar.xz
[mempool] add GetPrioritisedTransactions
Diffstat (limited to 'src/txmempool.h')
-rw-r--r--src/txmempool.h13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/txmempool.h b/src/txmempool.h
index 2c3cb7e9db..2f57c4c047 100644
--- a/src/txmempool.h
+++ b/src/txmempool.h
@@ -516,6 +516,19 @@ public:
void ApplyDelta(const uint256& hash, CAmount &nFeeDelta) const EXCLUSIVE_LOCKS_REQUIRED(cs);
void ClearPrioritisation(const uint256& hash) EXCLUSIVE_LOCKS_REQUIRED(cs);
+ struct delta_info {
+ /** Whether this transaction is in the mempool. */
+ const bool in_mempool;
+ /** The fee delta added using PrioritiseTransaction(). */
+ const CAmount delta;
+ /** The modified fee (base fee + delta) of this entry. Only present if in_mempool=true. */
+ std::optional<CAmount> modified_fee;
+ /** The prioritised transaction's txid. */
+ const uint256 txid;
+ };
+ /** Return a vector of all entries in mapDeltas with their corresponding delta_info. */
+ std::vector<delta_info> GetPrioritisedTransactions() const EXCLUSIVE_LOCKS_REQUIRED(!cs);
+
/** Get the transaction in the pool that spends the same prevout */
const CTransaction* GetConflictTx(const COutPoint& prevout) const EXCLUSIVE_LOCKS_REQUIRED(cs);