diff options
author | Riccardo Spagni <ric@spagni.net> | 2017-09-18 13:08:16 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2017-09-18 13:08:16 +0200 |
commit | 591e53445b2643af1e9a5266ffa5324cad758255 (patch) | |
tree | b10169969aab78bdf6868f9c48176a8804182ee9 /src/cryptonote_core/tx_pool.h | |
parent | Merge pull request #2378 (diff) | |
parent | Fix various oversights/bugs in ZMQ RPC server code (diff) | |
download | monero-591e53445b2643af1e9a5266ffa5324cad758255.tar.xz |
Merge pull request #2044
0299cb77 Fix various oversights/bugs in ZMQ RPC server code (Thomas Winget)
77986023 json serialization for rpc-relevant monero types (Thomas Winget)
5c1e08fe Refactor some things into more composable (smaller) functions (Thomas Winget)
9ac2ad07 DRY refactoring (Thomas Winget)
Diffstat (limited to 'src/cryptonote_core/tx_pool.h')
-rw-r--r-- | src/cryptonote_core/tx_pool.h | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/src/cryptonote_core/tx_pool.h b/src/cryptonote_core/tx_pool.h index 6414620c9..3e4ccb338 100644 --- a/src/cryptonote_core/tx_pool.h +++ b/src/cryptonote_core/tx_pool.h @@ -46,6 +46,7 @@ #include "blockchain_db/blockchain_db.h" #include "crypto/hash.h" #include "rpc/core_rpc_server_commands_defs.h" +#include "rpc/message_data_structs.h" namespace cryptonote { @@ -269,6 +270,28 @@ namespace cryptonote bool get_transactions_and_spent_keys_info(std::vector<tx_info>& tx_infos, std::vector<spent_key_image_info>& key_image_infos) const; /** + * @brief get information about all transactions and key images in the pool + * + * see documentation on tx_in_pool and key_images_with_tx_hashes for more details + * + * @param tx_infos [out] the transactions' information + * @param key_image_infos [out] the spent key images' information + * + * @return true + */ + bool get_pool_for_rpc(std::vector<cryptonote::rpc::tx_in_pool>& tx_infos, cryptonote::rpc::key_images_with_tx_hashes& key_image_infos) const; + + /** + * @brief check for presence of key images in the pool + * + * @param key_images [in] vector of key images to check + * @param spent [out] vector of bool to return + * + * @return true + */ + bool check_for_key_images(const std::vector<crypto::key_image>& key_images, std::vector<bool> spent) const; + + /** * @brief get a specific transaction from the pool * * @param h the hash of the transaction to get |