aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorwarptangent <warptangent@inbox.com>2015-05-08 11:40:15 -0700
committerwarptangent <warptangent@inbox.com>2015-05-08 14:12:13 -0700
commita52496de7798c1ea1ed96f3ca34f4d7f7723354a (patch)
treee2ec07761da8e3c20a2419a4b02a127bab8bda86 /src
parentAdd basic "pop blocks" command to blockchain_import for debugging (diff)
downloadmonero-a52496de7798c1ea1ed96f3ca34f4d7f7723354a.tar.xz
Condense #if directives
Diffstat (limited to 'src')
-rw-r--r--src/blockchain_converter/blockchain_export.cpp11
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