Merge pull request #5718

c8709fe wallet: do not print log settings when unset (moneromooo-monero)
7b18e83 unit_tests: check return values on test data parsing (moneromooo-monero)
This commit is contained in:
luigi1111 2019-08-19 17:17:11 -05:00
commit 2da11baecc
No known key found for this signature in database
GPG Key ID: F4ACA0183641E010
2 changed files with 6 additions and 3 deletions

View File

@ -206,7 +206,10 @@ namespace wallet_args
if (!command_line::is_arg_defaulted(vm, arg_log_level)) if (!command_line::is_arg_defaulted(vm, arg_log_level))
MINFO("Setting log level = " << command_line::get_arg(vm, arg_log_level)); MINFO("Setting log level = " << command_line::get_arg(vm, arg_log_level));
else else
MINFO("Setting log levels = " << getenv("MONERO_LOGS")); {
const char *logs = getenv("MONERO_LOGS");
MINFO("Setting log levels = " << (logs ? logs : "<default>"));
}
MINFO(wallet_args::tr("Logging to: ") << log_path); MINFO(wallet_args::tr("Logging to: ") << log_path);
Print(print) << boost::format(wallet_args::tr("Logging to %s")) % log_path; Print(print) << boost::format(wallet_args::tr("Logging to %s")) % log_path;

View File

@ -162,7 +162,7 @@ protected:
{ {
block bl; block bl;
blobdata bd = h2b(i); blobdata bd = h2b(i);
parse_and_validate_block_from_blob(bd, bl); CHECK_AND_ASSERT_THROW_MES(parse_and_validate_block_from_blob(bd, bl), "Invalid block");
m_blocks.push_back(std::make_pair(bl, bd)); m_blocks.push_back(std::make_pair(bl, bd));
} }
for (auto& i : t_transactions) for (auto& i : t_transactions)
@ -172,7 +172,7 @@ protected:
{ {
transaction tx; transaction tx;
blobdata bd = h2b(j); blobdata bd = h2b(j);
parse_and_validate_tx_from_blob(bd, tx); CHECK_AND_ASSERT_THROW_MES(parse_and_validate_tx_from_blob(bd, tx), "Invalid transaction");
txs.push_back(std::make_pair(tx, bd)); txs.push_back(std::make_pair(tx, bd));
} }
m_txs.push_back(txs); m_txs.push_back(txs);