aboutsummaryrefslogtreecommitdiff
path: root/src/cryptonote_basic
diff options
context:
space:
mode:
authormoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-01-19 13:02:47 +0000
committermoneromooo-monero <moneromooo-monero@users.noreply.github.com>2019-03-04 22:38:06 +0000
commit23abe60705a7b1040d177478a3ff1403d1fe0ef4 (patch)
tree8a7361e525f9e7e45bb04e4f252fd9a1c430d0a7 /src/cryptonote_basic
parentdefault initialize rpc structures (diff)
downloadmonero-23abe60705a7b1040d177478a3ff1403d1fe0ef4.tar.xz
check load_t_from_json return values
Diffstat (limited to 'src/cryptonote_basic')
-rw-r--r--src/cryptonote_basic/miner.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/cryptonote_basic/miner.cpp b/src/cryptonote_basic/miner.cpp
index d29a3dcd6..3a51c6ea4 100644
--- a/src/cryptonote_basic/miner.cpp
+++ b/src/cryptonote_basic/miner.cpp
@@ -305,7 +305,8 @@ namespace cryptonote
}
m_config_folder_path = boost::filesystem::path(command_line::get_arg(vm, arg_extra_messages)).parent_path().string();
m_config = AUTO_VAL_INIT(m_config);
- epee::serialization::load_t_from_json_file(m_config, m_config_folder_path + "/" + MINER_CONFIG_FILE_NAME);
+ const std::string filename = m_config_folder_path + "/" + MINER_CONFIG_FILE_NAME;
+ CHECK_AND_ASSERT_MES(epee::serialization::load_t_from_json_file(m_config, filename), false, "Failed to load data from " << filename);
MINFO("Loaded " << m_extra_messages.size() << " extra messages, current index " << m_config.current_extra_message_index);
}