From e49c161987d6f9c8fecc8e5f96f065d8686e53a7 Mon Sep 17 00:00:00 2001 From: rckngOpossum Date: Thu, 15 Sep 2016 15:36:16 -0500 Subject: compile errors fixed when DEBUG_CREATE_BLOCK_TEMPLATE defined --- src/cryptonote_core/blockchain.cpp | 2 +- src/cryptonote_core/cryptonote_format_utils.cpp | 2 +- src/cryptonote_core/tx_pool.h | 6 ++++++ 3 files changed, 8 insertions(+), 2 deletions(-) diff --git a/src/cryptonote_core/blockchain.cpp b/src/cryptonote_core/blockchain.cpp index b15eb4b90..cbc2315c6 100644 --- a/src/cryptonote_core/blockchain.cpp +++ b/src/cryptonote_core/blockchain.cpp @@ -1105,7 +1105,7 @@ bool Blockchain::create_block_template(block& b, const account_public_address& m } else { - if (cur_tx.fee != cur_tx.tx.txnFee) + if (cur_tx.fee != cur_tx.tx.rct_signatures.txnFee) { LOG_ERROR("Creating block template: error: invalid fee"); } diff --git a/src/cryptonote_core/cryptonote_format_utils.cpp b/src/cryptonote_core/cryptonote_format_utils.cpp index 9667006a3..d1ccfc7d1 100644 --- a/src/cryptonote_core/cryptonote_format_utils.cpp +++ b/src/cryptonote_core/cryptonote_format_utils.cpp @@ -129,7 +129,7 @@ namespace cryptonote #if defined(DEBUG_CREATE_BLOCK_TEMPLATE) LOG_PRINT_L1("Creating block template: reward " << block_reward << - ", fee " << fee) + ", fee " << fee); #endif block_reward += fee; diff --git a/src/cryptonote_core/tx_pool.h b/src/cryptonote_core/tx_pool.h index 0e280872d..794b86719 100644 --- a/src/cryptonote_core/tx_pool.h +++ b/src/cryptonote_core/tx_pool.h @@ -455,8 +455,14 @@ namespace cryptonote */ typedef std::unordered_map > key_images_container; +#if defined(DEBUG_CREATE_BLOCK_TEMPLATE) +public: +#endif mutable epee::critical_section m_transactions_lock; //!< lock for the pool transactions_container m_transactions; //!< container for transactions in the pool +#if defined(DEBUG_CREATE_BLOCK_TEMPLATE) +private: +#endif //! container for spent key images from the transactions in the pool key_images_container m_spent_key_images; -- cgit v1.2.3 From e29e8b1b991e878c1629c04572d4a5ef8e7b9b67 Mon Sep 17 00:00:00 2001 From: rckngOpossum Date: Thu, 15 Sep 2016 15:55:07 -0500 Subject: compile errors fixed when PER_BLOCK_CHECKPOINT not defined --- src/cryptonote_core/blockchain.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/cryptonote_core/blockchain.cpp b/src/cryptonote_core/blockchain.cpp index cbc2315c6..83e6e40b0 100644 --- a/src/cryptonote_core/blockchain.cpp +++ b/src/cryptonote_core/blockchain.cpp @@ -2956,8 +2956,8 @@ leave: // be a parameter? // validate proof_of_work versus difficulty target bool precomputed = false; -#if defined(PER_BLOCK_CHECKPOINT) bool fast_check = false; +#if defined(PER_BLOCK_CHECKPOINT) if (m_db->height() < m_blocks_hash_check.size()) { auto hash = get_block_hash(bl); @@ -3758,6 +3758,7 @@ std::map Blockchain:: get_output_histogram(const std::vector return m_db->get_output_histogram(amounts, unlocked); } +#if defined(PER_BLOCK_CHECKPOINT) void Blockchain::load_compiled_in_block_hashes() { if (m_fast_sync && get_blocks_dat_start(m_testnet) != nullptr) @@ -3800,6 +3801,7 @@ void Blockchain::load_compiled_in_block_hashes() } } } +#endif bool Blockchain::for_all_key_images(std::function f) const { -- cgit v1.2.3