From ec833ec4900c9f561b83013a9ee58f90262f8862 Mon Sep 17 00:00:00 2001 From: sowle Date: Wed, 8 Jul 2020 18:19:09 +0300 Subject: [PATCH] minor fixes --- contrib/epee/include/string_tools.h | 3 ++- src/currency_core/currency_core.cpp | 15 ++++++++------- 2 files changed, 10 insertions(+), 8 deletions(-) diff --git a/contrib/epee/include/string_tools.h b/contrib/epee/include/string_tools.h index 6b9abed1..a4e67f4c 100644 --- a/contrib/epee/include/string_tools.h +++ b/contrib/epee/include/string_tools.h @@ -608,7 +608,8 @@ POP_GCC_WARNINGS t_pod_type hex_to_pod(const std::string& hex_str) { t_pod_type p = AUTO_VAL_INIT(p); - hex_to_pod(hex_str, p); + if (!hex_to_pod(hex_str, p)) + return AUTO_VAL_INIT_T(t_pod_type); return p; } //---------------------------------------------------------------------------- diff --git a/src/currency_core/currency_core.cpp b/src/currency_core/currency_core.cpp index 2c397b36..cd0b5d85 100644 --- a/src/currency_core/currency_core.cpp +++ b/src/currency_core/currency_core.cpp @@ -31,13 +31,14 @@ namespace currency { //----------------------------------------------------------------------------------------------- - core::core(i_currency_protocol* pprotocol): - m_mempool(m_blockchain_storage, pprotocol), - m_blockchain_storage(m_mempool), - m_miner(this, m_blockchain_storage), - m_miner_address(boost::value_initialized()), - m_starter_message_showed(false), - m_critical_error_handler(nullptr) + core::core(i_currency_protocol* pprotocol) + : m_mempool(m_blockchain_storage, pprotocol) + , m_blockchain_storage(m_mempool) + , m_miner(this, m_blockchain_storage) + , m_miner_address(boost::value_initialized()) + , m_starter_message_showed(false) + , m_critical_error_handler(nullptr) + , m_stop_after_height(0) { set_currency_protocol(pprotocol); }