diff options
author | Riccardo Spagni <ric@spagni.net> | 2017-05-30 21:12:44 +0200 |
---|---|---|
committer | Riccardo Spagni <ric@spagni.net> | 2017-05-30 21:12:44 +0200 |
commit | 545e2b003c6a4930e9f18e6d5696c2cd85a5cb22 (patch) | |
tree | 3c156bab193a4d1c01ef20a2764b4439f01e3699 /src/cryptonote_core/blockchain.h | |
parent | Merge pull request #2015 (diff) | |
parent | Move txpool to the database (diff) | |
download | monero-545e2b003c6a4930e9f18e6d5696c2cd85a5cb22.tar.xz |
Merge pull request #1982
b52abd13 Move txpool to the database (moneromooo-monero)
Diffstat (limited to 'src/cryptonote_core/blockchain.h')
-rw-r--r-- | src/cryptonote_core/blockchain.h | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/cryptonote_core/blockchain.h b/src/cryptonote_core/blockchain.h index 46f7ac682..89efe5452 100644 --- a/src/cryptonote_core/blockchain.h +++ b/src/cryptonote_core/blockchain.h @@ -855,6 +855,17 @@ namespace cryptonote */ std::list<std::pair<block_extended_info,uint64_t>> get_alternative_chains() const; + void add_txpool_tx(transaction &tx, const txpool_tx_meta_t &meta); + void update_txpool_tx(const crypto::hash &txid, const txpool_tx_meta_t &meta); + void remove_txpool_tx(const crypto::hash &txid); + uint64_t get_txpool_tx_count() const; + txpool_tx_meta_t get_txpool_tx_meta(const crypto::hash& txid) const; + cryptonote::blobdata get_txpool_tx_blob(const crypto::hash& txid) const; + bool for_all_txpool_txes(std::function<bool(const crypto::hash&, const txpool_tx_meta_t&, const cryptonote::blobdata*)>, bool include_blob = false) const; + + void lock(); + void unlock(); + void cancel(); private: @@ -1239,7 +1250,7 @@ namespace cryptonote * @return true */ bool update_next_cumulative_size_limit(); - void return_tx_to_pool(const std::vector<transaction> &txs); + void return_tx_to_pool(std::vector<transaction> &txs); /** * @brief make sure a transaction isn't attempting a double-spend |