diff options
Diffstat (limited to 'src/rpc')
-rw-r--r-- | src/rpc/core_rpc_server.cpp | 4 | ||||
-rw-r--r-- | src/rpc/core_rpc_server_commands_defs.h | 15 |
2 files changed, 15 insertions, 4 deletions
diff --git a/src/rpc/core_rpc_server.cpp b/src/rpc/core_rpc_server.cpp index 8eeac489d..561161950 100644 --- a/src/rpc/core_rpc_server.cpp +++ b/src/rpc/core_rpc_server.cpp @@ -401,10 +401,8 @@ namespace cryptonote //------------------------------------------------------------------------------------------------------------------------------ bool core_rpc_server::on_get_transaction_pool(const COMMAND_RPC_GET_TRANSACTION_POOL::request& req, COMMAND_RPC_GET_TRANSACTION_POOL::response& res) { - /* CHECK_CORE_BUSY(); - res.transactions = m_core.transaction_pool_info(); - */ + m_core.get_pool_transactions_and_spent_keys_info(res.transactions, res.spent_key_images); res.status = CORE_RPC_STATUS_OK; return true; } diff --git a/src/rpc/core_rpc_server_commands_defs.h b/src/rpc/core_rpc_server_commands_defs.h index e54dec2c9..b6a2edd0b 100644 --- a/src/rpc/core_rpc_server_commands_defs.h +++ b/src/rpc/core_rpc_server_commands_defs.h @@ -619,7 +619,18 @@ namespace cryptonote KV_SERIALIZE(receive_time) END_KV_SERIALIZE_MAP() }; - + + struct spent_key_image_info + { + std::string id_hash; + std::vector<std::string> txs_hashes; + + BEGIN_KV_SERIALIZE_MAP() + KV_SERIALIZE(id_hash) + KV_SERIALIZE(txs_hashes) + END_KV_SERIALIZE_MAP() + }; + struct COMMAND_RPC_GET_TRANSACTION_POOL { struct request @@ -632,10 +643,12 @@ namespace cryptonote { std::string status; std::vector<tx_info> transactions; + std::vector<spent_key_image_info> spent_key_images; BEGIN_KV_SERIALIZE_MAP() KV_SERIALIZE(status) KV_SERIALIZE(transactions) + KV_SERIALIZE(spent_key_images) END_KV_SERIALIZE_MAP() }; }; |