Increase various potentially fatal error log levels

MERROR doesn't come through at default low-logging level so promote them
to MFATAL so it's more obvious where things are failing when they fail.
This commit is contained in:
Jason Rhinelander 2021-04-20 00:16:20 -03:00
parent 2047edcd79
commit fd7c35801f
3 changed files with 8 additions and 8 deletions

View File

@ -372,7 +372,7 @@ bool Blockchain::load_missing_blocks_into_oxen_subsystems()
if (!m_service_node_list.block_added(blk, txs, checkpoint_ptr))
{
MERROR("Unable to process block for updating service node list: " << cryptonote::get_block_hash(blk));
MFATAL("Unable to process block for updating service node list: " << cryptonote::get_block_hash(blk));
return false;
}
snl_iteration_duration += clock::now() - snl_start;
@ -383,7 +383,7 @@ bool Blockchain::load_missing_blocks_into_oxen_subsystems()
auto ons_start = clock::now();
if (!m_ons_db.add_block(blk, txs))
{
MERROR("Unable to process block for updating ONS DB: " << cryptonote::get_block_hash(blk));
MFATAL("Unable to process block for updating ONS DB: " << cryptonote::get_block_hash(blk));
return false;
}
ons_iteration_duration += clock::now() - ons_start;
@ -543,12 +543,12 @@ bool Blockchain::init(BlockchainDB* db, sqlite3 *ons_db, const network_type nett
// so we re-throw
catch (const std::exception& e)
{
MERROR("Error popping block from blockchain: " << e.what());
MFATAL("Error popping block from blockchain: " << e.what());
throw;
}
catch (...)
{
MERROR("Error popping block from blockchain, throwing!");
MFATAL("Error popping block from blockchain, throwing!");
throw;
}
}
@ -574,7 +574,7 @@ bool Blockchain::init(BlockchainDB* db, sqlite3 *ons_db, const network_type nett
if (ons_db && !m_ons_db.init(this, nettype, ons_db))
{
MERROR("ONS failed to initialise");
MFATAL("ONS failed to initialise");
return false;
}
@ -585,7 +585,7 @@ bool Blockchain::init(BlockchainDB* db, sqlite3 *ons_db, const network_type nett
if (!m_db->is_read_only() && !load_missing_blocks_into_oxen_subsystems())
{
MERROR("Failed to load blocks into oxen subsystems");
MFATAL("Failed to load blocks into oxen subsystems");
return false;
}

View File

@ -2095,7 +2095,7 @@ bool name_system_db::add_block(const cryptonote::block &block, const std::vector
std::string fail_reason;
if (!validate_ons_tx(block.major_version, height, tx, entry, &fail_reason))
{
LOG_PRINT_L0("ONS TX: Failed to validate for tx=" << get_transaction_hash(tx) << ". This should have failed validation earlier reason=" << fail_reason);
MFATAL("ONS TX: Failed to validate for tx=" << get_transaction_hash(tx) << ". This should have failed validation earlier reason=" << fail_reason);
assert("Failed to validate acquire name service. Should already have failed validation prior" == nullptr);
return false;
}

View File

@ -1609,7 +1609,7 @@ namespace service_nodes
std::shared_ptr<const quorum> quorum = get_quorum(quorum_type::pulse, block_height, false, nullptr);
if (!quorum || quorum->validators.empty())
{
MERROR("Unexpected Pulse error " << (quorum ? " quorum was not generated" : " quorum was empty"));
MFATAL("Unexpected Pulse error " << (quorum ? " quorum was not generated" : " quorum was empty"));
return false;
}