aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core/tx_pool.h
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-04-16 00:16:02 +0100
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2018-06-26 22:14:21 +0100
commited2c81ed95be71bace897e62a0c241068cfde7be (patch)
treea6077a06dc4aa4bcf127f26092cb43f3c3742e3b /src/cryptonote_core/tx_pool.h
parentrpc: sanity check on number of txes in a block (diff)
downloadmonero-ed2c81ed95be71bace897e62a0c241068cfde7be.tar.xz
replace std::list with std::vector on some hot paths
also use reserve where appropriate
Diffstat (limited to 'src/cryptonote_core/tx_pool.h')
-rw-r--r--src/cryptonote_core/tx_pool.h6
1 files changed, 3 insertions, 3 deletions
diff --git a/src/cryptonote_core/tx_pool.h b/src/cryptonote_core/tx_pool.h
index 4ce2f085d..5ccb71196 100644
--- a/src/cryptonote_core/tx_pool.h
+++ b/src/cryptonote_core/tx_pool.h
@@ -237,7 +237,7 @@ namespace cryptonote
* @param include_unrelayed_txes include unrelayed txes in the result
*
*/
- void get_transactions(std::list<transaction>& txs, bool include_unrelayed_txes = true) const;
+ void get_transactions(std::vector<transaction>& txs, bool include_unrelayed_txes = true) const;
/**
* @brief get a list of all transaction hashes in the pool
@@ -324,14 +324,14 @@ namespace cryptonote
*
* @return true
*/
- bool get_relayable_transactions(std::list<std::pair<crypto::hash, cryptonote::blobdata>>& txs) const;
+ bool get_relayable_transactions(std::vector<std::pair<crypto::hash, cryptonote::blobdata>>& txs) const;
/**
* @brief tell the pool that certain transactions were just relayed
*
* @param txs the list of transactions (and their hashes)
*/
- void set_relayed(const std::list<std::pair<crypto::hash, cryptonote::blobdata>>& txs);
+ void set_relayed(const std::vector<std::pair<crypto::hash, cryptonote::blobdata>>& txs);
/**
* @brief get the total number of transactions in the pool