aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core/tx_pool.h
diff options
context:
space:
mode:
authorLee Clagett <code@leeclagett.com>2020-03-26 12:24:45 +0000
committerLee Clagett <code@leeclagett.com>2020-03-30 17:52:42 +0000
commit571546067f1b1d0f51a2a796e2509c93133e1cf4 (patch)
treea4a911d843c893fd8cb5e18f419ce473b0973a61 /src/cryptonote_core/tx_pool.h
parentAllow unrestricted rpc calls to get full txpool info (diff)
downloadmonero-571546067f1b1d0f51a2a796e2509c93133e1cf4.tar.xz
Always reject duplicate key-images from second txid
Diffstat (limited to 'src/cryptonote_core/tx_pool.h')
-rw-r--r--src/cryptonote_core/tx_pool.h6
1 files changed, 4 insertions, 2 deletions
diff --git a/src/cryptonote_core/tx_pool.h b/src/cryptonote_core/tx_pool.h
index ca0e50415..292d427e2 100644
--- a/src/cryptonote_core/tx_pool.h
+++ b/src/cryptonote_core/tx_pool.h
@@ -470,10 +470,11 @@ namespace cryptonote
* @brief check if a transaction in the pool has a given spent key image
*
* @param key_im the spent key image to look for
+ * @param txid hash of the new transaction where `key_im` was seen.
*
* @return true if the spent key image is present, otherwise false
*/
- bool have_tx_keyimg_as_spent(const crypto::key_image& key_im) const;
+ bool have_tx_keyimg_as_spent(const crypto::key_image& key_im, const crypto::hash& txid) const;
/**
* @brief check if any spent key image in a transaction is in the pool
@@ -484,10 +485,11 @@ namespace cryptonote
* @note see tx_pool::have_tx_keyimg_as_spent
*
* @param tx the transaction to check spent key images of
+ * @param txid hash of `tx`.
*
* @return true if any spent key images are present in the pool, otherwise false
*/
- bool have_tx_keyimges_as_spent(const transaction& tx) const;
+ bool have_tx_keyimges_as_spent(const transaction& tx, const crypto::hash& txid) const;
/**
* @brief forget a transaction's spent key images