aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_core/tx_pool.h
diff options
context:
space:
mode:
authorRiccardo Spagni <ric@spagni.net>2016-01-29 19:24:24 +0200
committerRiccardo Spagni <ric@spagni.net>2016-01-29 19:24:24 +0200
commitb91fc2dc3c4489f44a74915ae80fd1968d150302 (patch)
tree96f432c221f6edb336b65000acf30f0c45e3efa9 /src/cryptonote_core/tx_pool.h
parentMerge pull request #628 (diff)
parenttx_pool: do not accept txes not in a block if they timed out before (diff)
downloadmonero-b91fc2dc3c4489f44a74915ae80fd1968d150302.tar.xz
Merge pull request #629
94b98fb tx_pool: do not accept txes not in a block if they timed out before (moneromooo-monero) eadbdf3 tx_pool: fix use of invalidated iterator (moneromooo-monero) 3b1d7e0 Fix V1/V2 use of hard fork related parameters (moneromooo-monero)
Diffstat (limited to 'src/cryptonote_core/tx_pool.h')
-rw-r--r--src/cryptonote_core/tx_pool.h10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/cryptonote_core/tx_pool.h b/src/cryptonote_core/tx_pool.h
index 5a3af1262..34dc1f72f 100644
--- a/src/cryptonote_core/tx_pool.h
+++ b/src/cryptonote_core/tx_pool.h
@@ -81,8 +81,8 @@ namespace cryptonote
#else
tx_memory_pool(blockchain_storage& bchs);
#endif
- bool add_tx(const transaction &tx, const crypto::hash &id, size_t blob_size, tx_verification_context& tvc, bool keeped_by_block, bool relayed);
- bool add_tx(const transaction &tx, tx_verification_context& tvc, bool keeped_by_block, bool relayed);
+ bool add_tx(const transaction &tx, const crypto::hash &id, size_t blob_size, tx_verification_context& tvc, bool keeped_by_block, bool relayed, uint8_t version);
+ bool add_tx(const transaction &tx, tx_verification_context& tvc, bool keeped_by_block, bool relayed, uint8_t version);
//gets tx and remove it from pool
bool take_tx(const crypto::hash &id, transaction &tx, size_t& blob_size, uint64_t& fee, bool &relayed);
@@ -105,11 +105,12 @@ namespace cryptonote
void set_relayed(const std::list<std::pair<crypto::hash, cryptonote::transaction>>& txs);
size_t get_transactions_count() const;
std::string print_pool(bool short_format) const;
+ size_t validate(uint8_t version);
/*bool flush_pool(const std::strig& folder);
bool inflate_pool(const std::strig& folder);*/
-#define CURRENT_MEMPOOL_ARCHIVE_VER 9
+#define CURRENT_MEMPOOL_ARCHIVE_VER 10
template<class archive_t>
void serialize(archive_t & a, const unsigned int version)
@@ -119,6 +120,7 @@ namespace cryptonote
CRITICAL_REGION_LOCAL(m_transactions_lock);
a & m_transactions;
a & m_spent_key_images;
+ a & m_timed_out_transactions;
}
struct tx_details
@@ -161,6 +163,8 @@ namespace cryptonote
sorted_tx_container::iterator find_tx_in_sorted_container(const crypto::hash& id) const;
+ std::unordered_set<crypto::hash> m_timed_out_transactions;
+
//transactions_container m_alternative_transactions;
std::string m_config_folder;