diff options
author | Thomas Winget <tewinget@gmail.com> | 2014-10-27 23:44:45 -0400 |
---|---|---|
committer | warptangent <warptangent@inbox.com> | 2015-01-04 19:29:51 -0800 |
commit | 74a1a89e27c719811a1fcc0578e4795802555225 (patch) | |
tree | c6379c517aae5eaa26a4d91010601143bf9ef8bf /src/cryptonote_core/blockchain.h | |
parent | All LMDB BlockchainDB implemented, not tested (diff) | |
download | monero-74a1a89e27c719811a1fcc0578e4795802555225.tar.xz |
Integrate BlockchainDB into cryptonote_core
Probably needs more looking at -- lot of things were done...in a rushed
sort of way. That said, it all builds and *should* be at least
testable.
update for rebase (warptangent 2015-01-04)
fix conflicts with upstream CMakeLists.txt files
src/CMakeLists.txt (remove edits from original commit)
tests/CMakeLists.txt (remove edits from original commit)
src/cryptonote_core/CMakeLists.txt (edit)
- use blockchain db .cpp and .h files
- add LMDB_LIBRARIES
Diffstat (limited to 'src/cryptonote_core/blockchain.h')
-rw-r--r-- | src/cryptonote_core/blockchain.h | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/src/cryptonote_core/blockchain.h b/src/cryptonote_core/blockchain.h index 884de122d..4024fa741 100644 --- a/src/cryptonote_core/blockchain.h +++ b/src/cryptonote_core/blockchain.h @@ -41,7 +41,6 @@ #include "syncobj.h" #include "string_tools.h" -#include "tx_pool.h" #include "cryptonote_basic.h" #include "common/util.h" #include "cryptonote_protocol/cryptonote_protocol_defs.h" @@ -55,6 +54,7 @@ namespace cryptonote { + class tx_memory_pool; /************************************************************************/ /* */ @@ -131,16 +131,19 @@ namespace cryptonote uint64_t block_difficulty(uint64_t i); template<class t_ids_container, class t_blocks_container, class t_missed_container> - void get_blocks(const t_ids_container& block_ids, t_blocks_container& blocks, t_missed_container& missed_bs); + bool get_blocks(const t_ids_container& block_ids, t_blocks_container& blocks, t_missed_container& missed_bs); template<class t_ids_container, class t_tx_container, class t_missed_container> - void get_transactions(const t_ids_container& txs_ids, t_tx_container& txs, t_missed_container& missed_txs); + bool get_transactions(const t_ids_container& txs_ids, t_tx_container& txs, t_missed_container& missed_txs); //debug functions void print_blockchain(uint64_t start_index, uint64_t end_index); void print_blockchain_index(); void print_blockchain_outs(const std::string& file); + void set_enforce_dns_checkpoints(bool enforce) { } + bool update_checkpoints(const std::string& path, bool dns) { return true; } + private: typedef std::unordered_map<crypto::hash, size_t> blocks_by_id_index; typedef std::unordered_map<crypto::hash, transaction_chain_entry> transactions_container; @@ -175,6 +178,7 @@ namespace cryptonote checkpoints m_checkpoints; std::atomic<bool> m_is_in_checkpoint_zone; std::atomic<bool> m_is_blockchain_storing; + bool m_testnet; bool switch_to_alternative_blockchain(std::list<blocks_ext_by_hash::iterator>& alt_chain, bool discard_disconnected_chain); block pop_block_from_blockchain(); |