diff options
author | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2016-05-26 21:48:18 +0100 |
---|---|---|
committer | moneromooo-monero <moneromooo-monero@users.noreply.github.com> | 2016-08-28 21:27:32 +0100 |
commit | 9e82b694da120708652871b55f639d1ef306a7ec (patch) | |
tree | 2f71ad434b63147cd94a7028388ddc79dbd81403 /src/blockchain_utilities/bootstrap_file.cpp | |
parent | ringct: lock access to the PRNG (diff) | |
download | monero-9e82b694da120708652871b55f639d1ef306a7ec.tar.xz |
remove original Cryptonote blockchain_storage blockchain format
Diffstat (limited to 'src/blockchain_utilities/bootstrap_file.cpp')
-rw-r--r-- | src/blockchain_utilities/bootstrap_file.cpp | 32 |
1 files changed, 0 insertions, 32 deletions
diff --git a/src/blockchain_utilities/bootstrap_file.cpp b/src/blockchain_utilities/bootstrap_file.cpp index da3b44593..61bd35a6f 100644 --- a/src/blockchain_utilities/bootstrap_file.cpp +++ b/src/blockchain_utilities/bootstrap_file.cpp @@ -223,31 +223,9 @@ void BootstrapFile::write_block(block& block) { throw std::runtime_error("Aborting: tx == null_hash"); } -#if SOURCE_DB == DB_MEMORY - const transaction* tx = m_blockchain_storage->get_tx(tx_id); -#else transaction tx = m_blockchain_storage->get_db().get_tx(tx_id); -#endif -#if SOURCE_DB == DB_MEMORY - if(tx == NULL) - { - if (! m_tx_pool) - throw std::runtime_error("Aborting: tx == NULL, so memory pool required to get tx, but memory pool isn't enabled"); - else - { - transaction tx; - if(m_tx_pool->get_transaction(tx_id, tx)) - txs.push_back(tx); - else - throw std::runtime_error("Aborting: tx not found in pool"); - } - } - else - txs.push_back(*tx); -#else txs.push_back(tx); -#endif } // these non-coinbase txs will be serialized using this structure @@ -257,15 +235,9 @@ void BootstrapFile::write_block(block& block) bool include_extra_block_data = true; if (include_extra_block_data) { -#if SOURCE_DB == DB_MEMORY - size_t block_size = m_blockchain_storage->get_block_size(block_height); - difficulty_type cumulative_difficulty = m_blockchain_storage->get_block_cumulative_difficulty(block_height); - uint64_t coins_generated = m_blockchain_storage->get_block_coins_generated(block_height); -#else size_t block_size = m_blockchain_storage->get_db().get_block_size(block_height); difficulty_type cumulative_difficulty = m_blockchain_storage->get_db().get_block_cumulative_difficulty(block_height); uint64_t coins_generated = m_blockchain_storage->get_db().get_block_already_generated_coins(block_height); -#endif bp.block_size = block_size; bp.cumulative_difficulty = cumulative_difficulty; @@ -288,11 +260,7 @@ bool BootstrapFile::close() } -#if SOURCE_DB == DB_MEMORY -bool BootstrapFile::store_blockchain_raw(blockchain_storage* _blockchain_storage, tx_memory_pool* _tx_pool, boost::filesystem::path& output_file, uint64_t requested_block_stop) -#else bool BootstrapFile::store_blockchain_raw(Blockchain* _blockchain_storage, tx_memory_pool* _tx_pool, boost::filesystem::path& output_file, uint64_t requested_block_stop) -#endif { uint64_t num_blocks_written = 0; m_max_chunk = 0; |