aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core/tx_pool.h
diff options
context:
space:
mode:
authorThomas Winget <tewinget@gmail.com>2017-09-05 12:20:27 -0400
committerThomas Winget <tewinget@gmail.com>2017-09-05 12:20:27 -0400
commit77986023c37737e298fc7c3e9938cce0e10d8b80 (patch)
tree81e024d5aea2cdce81f93d155634da6e3c6a2f04 /src/cryptonote_core/tx_pool.h
parentRefactor some things into more composable (smaller) functions (diff)
downloadmonero-77986023c37737e298fc7c3e9938cce0e10d8b80.tar.xz
json serialization for rpc-relevant monero types
Structured {de-,}serialization methods for (many new) types which are used for requests or responses in the RPC. New types include RPC requests and responses, and structs which compose types within those. # Conflicts: # src/cryptonote_core/blockchain.cpp
Diffstat (limited to 'src/cryptonote_core/tx_pool.h')
-rw-r--r--src/cryptonote_core/tx_pool.h23
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