diff options
author | warptangent <warptangent@inbox.com> | 2015-05-08 11:40:15 -0700 |
---|---|---|
committer | warptangent <warptangent@inbox.com> | 2015-05-08 14:12:13 -0700 |
commit | a52496de7798c1ea1ed96f3ca34f4d7f7723354a (patch) | |
tree | e2ec07761da8e3c20a2419a4b02a127bab8bda86 | |
parent | Add basic "pop blocks" command to blockchain_import for debugging (diff) | |
download | monero-a52496de7798c1ea1ed96f3ca34f4d7f7723354a.tar.xz |
Condense #if directives
-rw-r--r-- | src/blockchain_converter/blockchain_export.cpp | 11 |
1 files changed, 2 insertions, 9 deletions
diff --git a/src/blockchain_converter/blockchain_export.cpp b/src/blockchain_converter/blockchain_export.cpp index ed88661c4..8d7c78be3 100644 --- a/src/blockchain_converter/blockchain_export.cpp +++ b/src/blockchain_converter/blockchain_export.cpp @@ -206,18 +206,11 @@ void BlockchainExport::write_block(block& block) { #if SOURCE_DB == DB_MEMORY size_t block_size = m_blockchain_storage->get_block_size(block_height); -#else - size_t block_size = m_blockchain_storage->get_db().get_block_size(block_height); -#endif -#if SOURCE_DB == DB_MEMORY difficulty_type cumulative_difficulty = m_blockchain_storage->get_block_cumulative_difficulty(block_height); -#else - difficulty_type cumulative_difficulty = m_blockchain_storage->get_db().get_block_cumulative_difficulty(block_height); -#endif -#if SOURCE_DB == DB_MEMORY uint64_t coins_generated = m_blockchain_storage->get_block_coins_generated(block_height); #else - // TODO TEST to verify that this is the equivalent. make sure no off-by-one error with block height vs block number + 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 |