forked from lthn/blockchain
fixed alerts and fixed resync after daemon restart
This commit is contained in:
parent
31f3a89aeb
commit
0674ea51fe
5 changed files with 11 additions and 10 deletions
|
|
@ -793,6 +793,7 @@ bool handle_increment_build_no(po::variables_map& vm)
|
|||
//---------------------------------------------------------------------------------------------------------------
|
||||
bool handle_update_maintainers_info(po::variables_map& vm)
|
||||
{
|
||||
log_space::log_singletone::add_logger(LOGGER_CONSOLE, NULL, NULL);
|
||||
if(!command_line::has_arg(vm, arg_rpc_port))
|
||||
{
|
||||
std::cout << "ERROR: rpc port not set" << ENDL;
|
||||
|
|
|
|||
|
|
@ -58,7 +58,7 @@ using namespace currency;
|
|||
#define BLOCKCHAIN_STORAGE_OPTIONS_ID_CURRENT_BLOCK_CUMUL_SZ_LIMIT 0
|
||||
#define BLOCKCHAIN_STORAGE_OPTIONS_ID_CURRENT_PRUNED_RS_HEIGHT 1
|
||||
#define BLOCKCHAIN_STORAGE_OPTIONS_ID_LAST_WORKED_VERSION 2
|
||||
#define BLOCKCHAIN_STORAGE_OPTIONS_ID_STORAGE_MAJOR_COMPATIBILITY_VERSION 4 //mismatch here means full resync
|
||||
#define BLOCKCHAIN_STORAGE_OPTIONS_ID_STORAGE_MAJOR_COMPATIBILITY_VERSION 3 //mismatch here means full resync
|
||||
#define BLOCKCHAIN_STORAGE_OPTIONS_ID_STORAGE_MINOR_COMPATIBILITY_VERSION 4 //mismatch here means some reinitializations
|
||||
|
||||
#define TARGETDATA_CACHE_SIZE DIFFICULTY_WINDOW + 10
|
||||
|
|
|
|||
|
|
@ -205,7 +205,7 @@
|
|||
#define CURRENT_TRANSACTION_CHAIN_ENTRY_ARCHIVE_VER 3
|
||||
#define CURRENT_BLOCK_EXTENDED_INFO_ARCHIVE_VER 1
|
||||
|
||||
#define BLOCKCHAIN_STORAGE_MAJOR_COMPATIBILITY_VERSION CURRENCY_FORMATION_VERSION + 4
|
||||
#define BLOCKCHAIN_STORAGE_MAJOR_COMPATIBILITY_VERSION CURRENCY_FORMATION_VERSION + 5
|
||||
#define BLOCKCHAIN_STORAGE_MINOR_COMPATIBILITY_VERSION 1
|
||||
|
||||
|
||||
|
|
|
|||
|
|
@ -402,14 +402,14 @@ namespace nodetool
|
|||
template<class t_payload_net_handler>
|
||||
bool node_server<t_payload_net_handler>::on_maintainers_entry_update()
|
||||
{
|
||||
LOG_PRINT_MAGENTA("Fresh maintainers info recieved(timestamp: " << m_maintainers_info_local.timestamp << ")", LOG_LEVEL_0);
|
||||
LOG_PRINT_CHANNEL_COLOR2(NULL, NULL, "Fresh maintainers info recieved(timestamp: " << m_maintainers_info_local.timestamp << ")", LOG_LEVEL_0, epee::log_space::console_color_magenta);
|
||||
if(PROJECT_VERSION_BUILD_NO < m_maintainers_info_local.build_no)
|
||||
{
|
||||
LOG_PRINT_MAGENTA("Newer version avaliable: " << static_cast<uint32_t>(m_maintainers_info_local.ver_major) <<
|
||||
LOG_PRINT_CHANNEL_COLOR2(NULL, NULL, "Newer version avaliable: " << static_cast<uint32_t>(m_maintainers_info_local.ver_major) <<
|
||||
"." << static_cast<uint32_t>(m_maintainers_info_local.ver_minor) <<
|
||||
"." << static_cast<uint32_t>(m_maintainers_info_local.ver_revision) <<
|
||||
"." << static_cast<uint32_t>(m_maintainers_info_local.build_no) <<
|
||||
", current version: " << PROJECT_VERSION_LONG, LOG_LEVEL_0);
|
||||
", current version: " << PROJECT_VERSION_LONG, LOG_LEVEL_0, epee::log_space::console_color_magenta);
|
||||
}
|
||||
handle_alert_conditions();
|
||||
|
||||
|
|
@ -893,7 +893,7 @@ namespace nodetool
|
|||
if(m_alert_mode != ALERT_TYPE_CALM)
|
||||
return true;
|
||||
|
||||
LOG_PRINT_L0("This software is old, please update.");
|
||||
LOG_PRINT_CHANNEL2(NULL, NULL, "This software is outdated, please update.", LOG_LEVEL_0);
|
||||
return true;
|
||||
}
|
||||
//-----------------------------------------------------------------------------------
|
||||
|
|
@ -903,7 +903,7 @@ namespace nodetool
|
|||
if(m_alert_mode != ALERT_TYPE_URGENT)
|
||||
return true;
|
||||
|
||||
LOG_PRINT_CYAN("[URGENT]:This software is old, please update.", LOG_LEVEL_0);
|
||||
LOG_PRINT_CHANNEL_COLOR2(NULL, NULL, "[URGENT]:This software is dramatically outdated, please update to latest version.", LOG_LEVEL_0, epee::log_space::console_color_cyan);
|
||||
return true;
|
||||
}
|
||||
//-----------------------------------------------------------------------------------
|
||||
|
|
@ -913,7 +913,7 @@ namespace nodetool
|
|||
if(m_alert_mode != ALERT_TYPE_CRITICAL)
|
||||
return true;
|
||||
|
||||
LOG_PRINT_RED("[CRITICAL]:This software is old, please update.", LOG_LEVEL_0);
|
||||
LOG_PRINT_CHANNEL_COLOR2(NULL, NULL, "[CRITICAL]:This software is critically outdated, please update to latest version.", LOG_LEVEL_0, epee::log_space::console_color_red);
|
||||
return true;
|
||||
}
|
||||
//-----------------------------------------------------------------------------------
|
||||
|
|
|
|||
|
|
@ -2,10 +2,10 @@
|
|||
"maj":1,
|
||||
"min":0,
|
||||
"rev":0,
|
||||
"build":8,
|
||||
"build":26,
|
||||
"cs":[
|
||||
{
|
||||
"build":7,
|
||||
"build":26,
|
||||
"mode":3
|
||||
}
|
||||
]
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue