diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-05-14 14:06:55 +0100 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2017-05-25 22:23:37 +0100 |
commit | b52abd1370cc21484d64f45504adbab47240debf (patch) | |
tree | 42c9327b4b928d008fcc61e4b7ca09c85ec9ccd9 /src/cryptonote_core/blockchain.h | |
parent | Merge pull request #1956 (diff) | |
download | monero-b52abd1370cc21484d64f45504adbab47240debf.tar.xz |
Move txpool to the database
Integration could go further (ie, return_tx_to_pool calls should
not be needed anymore, possibly other things).
poolstate.bin is now obsolete.
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 9dacba363..100430c3a 100644 --- a/src/cryptonote_core/blockchain.h +++ b/src/cryptonote_core/blockchain.h @@ -854,6 +854,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: @@ -1238,7 +1249,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 |