diff options
author | Riccardo Spagni <ric@spagni.net> | 2016-11-11 12:34:43 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2016-11-11 12:34:43 +0200 |
commit | 5f568533aab82e1febffe634da0e4013b19e7037 (patch) | |
tree | e3a15ecc15ee4275d22f54d70c7dafc3c138afde /src/cryptonote_core | |
parent | Merge pull request #1312 (diff) | |
parent | add lightweight block propagation ("fluffy blocks") (diff) | |
download | monero-5f568533aab82e1febffe634da0e4013b19e7037.tar.xz |
Merge pull request #1263
d61bd81 add lightweight block propagation ("fluffy blocks") (Dion Ahmetaj)
Diffstat (limited to 'src/cryptonote_core')
-rw-r--r-- | src/cryptonote_core/cryptonote_core.cpp | 5 | ||||
-rw-r--r-- | src/cryptonote_core/cryptonote_core.h | 14 |
2 files changed, 19 insertions, 0 deletions
diff --git a/src/cryptonote_core/cryptonote_core.cpp b/src/cryptonote_core/cryptonote_core.cpp index 95c49f627..9deb8863d 100644 --- a/src/cryptonote_core/cryptonote_core.cpp +++ b/src/cryptonote_core/cryptonote_core.cpp @@ -915,6 +915,11 @@ namespace cryptonote m_mempool.get_transactions(txs); return true; } + //----------------------------------------------------------------------------------------------- + bool core::get_pool_transaction(const crypto::hash &id, transaction& tx) const + { + return m_mempool.get_transaction(id, tx); + } //----------------------------------------------------------------------------------------------- bool core::get_pool_transactions_and_spent_keys_info(std::vector<tx_info>& tx_infos, std::vector<spent_key_image_info>& key_image_infos) const { diff --git a/src/cryptonote_core/cryptonote_core.h b/src/cryptonote_core/cryptonote_core.h index a5a97a5ad..5ddab4ed4 100644 --- a/src/cryptonote_core/cryptonote_core.h +++ b/src/cryptonote_core/cryptonote_core.h @@ -379,6 +379,13 @@ namespace cryptonote * @note see tx_memory_pool::get_transactions */ bool get_pool_transactions(std::list<transaction>& txs) const; + + /** + * @copydoc tx_memory_pool::get_transaction + * + * @note see tx_memory_pool::get_transaction + */ + bool get_pool_transaction(const crypto::hash& id, transaction& tx) const; /** * @copydoc tx_memory_pool::get_pool_transactions_and_spent_keys_info @@ -611,6 +618,13 @@ namespace cryptonote * @return the number of blocks to sync in one go */ std::pair<uint64_t, uint64_t> get_coinbase_tx_sum(const uint64_t start_offset, const size_t count); + + /** + * @brief get whether we're on testnet or not + * + * @return are we on testnet? + */ + bool get_testnet() const { return m_testnet; }; private: |