diff options
| author | Thomas Winget <tewinget@gmail.com> | 2017-09-05 12:20:27 -0400 |
|---|---|---|
| committer | Thomas Winget <tewinget@gmail.com> | 2017-09-05 12:20:27 -0400 |
| commit | 77986023c37737e298fc7c3e9938cce0e10d8b80 (patch) | |
| tree | 81e024d5aea2cdce81f93d155634da6e3c6a2f04 /src/cryptonote_core/cryptonote_core.cpp | |
| parent | 5c1e08fe806f0f4dbd06989bafe4df7b4e3601e8 (diff) | |
| download | monzero-core-77986023c37737e298fc7c3e9938cce0e10d8b80.tar.gz monzero-core-77986023c37737e298fc7c3e9938cce0e10d8b80.tar.xz monzero-core-77986023c37737e298fc7c3e9938cce0e10d8b80.zip | |
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/cryptonote_core.cpp')
| -rw-r--r-- | src/cryptonote_core/cryptonote_core.cpp | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/src/cryptonote_core/cryptonote_core.cpp b/src/cryptonote_core/cryptonote_core.cpp index c406dd0b4..cda54c65d 100644 --- a/src/cryptonote_core/cryptonote_core.cpp +++ b/src/cryptonote_core/cryptonote_core.cpp @@ -790,6 +790,13 @@ namespace cryptonote return BLOCKS_SYNCHRONIZING_DEFAULT_COUNT_PRE_V4; } //----------------------------------------------------------------------------------------------- + bool core::are_key_images_spent_in_pool(const std::vector<crypto::key_image>& key_im, std::vector<bool> &spent) const + { + spent.clear(); + + return m_mempool.check_for_key_images(key_im, spent); + } + //----------------------------------------------------------------------------------------------- std::pair<uint64_t, uint64_t> core::get_coinbase_tx_sum(const uint64_t start_offset, const size_t count) { uint64_t emission_amount = 0; @@ -1175,6 +1182,11 @@ namespace cryptonote return m_mempool.get_transactions_and_spent_keys_info(tx_infos, key_image_infos); } //----------------------------------------------------------------------------------------------- + bool core::get_pool_for_rpc(std::vector<cryptonote::rpc::tx_in_pool>& tx_infos, cryptonote::rpc::key_images_with_tx_hashes& key_image_infos) const + { + return m_mempool.get_pool_for_rpc(tx_infos, key_image_infos); + } + //----------------------------------------------------------------------------------------------- bool core::get_short_chain_history(std::list<crypto::hash>& ids) const { return m_blockchain_storage.get_short_chain_history(ids); |
