aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core/tx_pool.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/cryptonote_core/tx_pool.h')
-rw-r--r--src/cryptonote_core/tx_pool.h9
1 files changed, 9 insertions, 0 deletions
diff --git a/src/cryptonote_core/tx_pool.h b/src/cryptonote_core/tx_pool.h
index 4ade7ddbe..4abfef85c 100644
--- a/src/cryptonote_core/tx_pool.h
+++ b/src/cryptonote_core/tx_pool.h
@@ -362,6 +362,13 @@ namespace cryptonote
*/
size_t validate(uint8_t version);
+ /**
+ * @brief return the cookie
+ *
+ * @return the cookie
+ */
+ uint64_t cookie() const { return m_cookie; }
+
/**
* @brief get the cumulative txpool size in bytes
*
@@ -549,6 +556,8 @@ private:
//!< container for transactions organized by fee per size and receive time
sorted_tx_container m_txs_by_fee_and_receive_time;
+ std::atomic<uint64_t> m_cookie; //!< incremented at each change
+
/**
* @brief get an iterator to a transaction in the sorted container
*