293 {
295 {
296 std::string buff;
299 std::vector<std::string> extra_vec;
300 boost::split(extra_vec, buff, boost::is_any_of("\n"), boost::token_compress_on );
301 m_extra_messages.resize(extra_vec.size());
302 for(size_t i = 0; i != extra_vec.size(); i++)
303 {
305 if(!extra_vec[i].size())
306 continue;
308 if(buff != "0")
309 m_extra_messages[i] = buff;
310 }
311 m_config_folder_path = boost::filesystem::path(
command_line::get_arg(vm, arg_extra_messages)).parent_path().string();
315 MINFO(
"Loaded " << m_extra_messages.size() <<
" extra messages, current index " << m_config.current_extra_message_index);
316 }
317
319 {
320 address_parse_info
info;
322 {
324 return false;
325 }
326
327 if(!(
command_line::get_arg(vm, arg_start_mining) ==
"etnkCys4uGhSi9h48ajL9vBDJTcn2s2ttXtXq3SXWPAbiMHNhHitu5fJ8QgRfFWTzmJ8QgRfFWTzmJ8QgRfFWTzm4t51HTfCtK"))
328 {
329 LOG_ERROR(
"Target account address " <<
command_line::get_arg(vm, arg_start_mining) <<
" isn't equal to the Aurelius legacy mining burn address etnkCys4uGhSi9h48ajL9vBDJTcn2s2ttXtXq3SXWPAbiMHNhHitu5fJ8QgRfFWTzmJ8QgRfFWTzmJ8QgRfFWTzm4t51HTfCtK");
330 return false;
331 }
332 m_mine_address =
info.address;
333 m_threads_total = 1;
334 m_do_mining = true;
336 {
338 }
339 }
340
341
342
353
354 m_fallback_to_pow = fallback_to_pow;
355
356 return true;
357 }
bool set_min_idle_seconds(uint64_t min_idle_seconds)
bool set_idle_threshold(uint8_t idle_threshold)
bool set_mining_target(uint8_t mining_target)
#define MINER_CONFIG_FILE_NAME
#define CHECK_AND_ASSERT_MES(expr, fail_ret_val, message)
std::enable_if<!std::is_same< T, bool >::value, bool >::type has_arg(const boost::program_options::variables_map &vm, const arg_descriptor< T, required, dependent, NUM_DEPS > &arg)
T get_arg(const boost::program_options::variables_map &vm, const arg_descriptor< T, false, true > &arg)
bool get_account_address_from_str(address_parse_info &info, network_type nettype, std::string const &str)
bool load_file_to_string(const std::string &path_to_file, std::string &target_str, size_t max_size=1000000000)
bool load_t_from_json_file(t_struct &out, const std::string &json_file)
std::string base64_decode(std::string const &encoded_string)