diff options
author | Lee Clagett <code@leeclagett.com> | 2020-03-26 12:24:45 +0000 |
---|---|---|
committer | Lee Clagett <code@leeclagett.com> | 2020-03-30 17:52:42 +0000 |
commit | 571546067f1b1d0f51a2a796e2509c93133e1cf4 (patch) | |
tree | a4a911d843c893fd8cb5e18f419ce473b0973a61 /src/cryptonote_core/tx_pool.h | |
parent | Allow unrestricted rpc calls to get full txpool info (diff) | |
download | monero-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.h | 6 |
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 |