From a9fa0ed23d9f9086c2a3084022a82a9f69332839 Mon Sep 17 00:00:00 2001 From: "Dmitriy A. Gerasimov" <dmitriy.gerasimov@demlabs.net> Date: Mon, 16 Dec 2019 01:16:35 +0700 Subject: [PATCH] [*] Rised log level from INFO to NOTICE for debug=false mode [+] Confirmations param for PoS consensus --- CMakeLists.txt | 2 +- dist/etc/network/kelvin-testnet/chain-plasma.cfg | 4 +++- libdap-chain-cs-dag-pos | 2 +- sources/main.c | 10 +++++----- 4 files changed, 10 insertions(+), 8 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index 09a614d..92e14a7 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -48,7 +48,7 @@ SET( CPACK_GENERATOR "DEB") SET( CPACK_PACKAGE_NAME "${PROJECT_NAME}") SET( CPACK_PACKAGE_VERSION_MAJOR 2) SET( CPACK_PACKAGE_VERSION_MINOR 8) -SET( CPACK_PACKAGE_VERSION_PATCH 0) +SET( CPACK_PACKAGE_VERSION_PATCH 1) SET( CPACK_SYSTEM_NAME "debian-9.9-amd64") SET( CPACK_PACKAGE_VERSION "${CPACK_PACKAGE_VERSION_MAJOR}.${CPACK_PACKAGE_VERSION_MINOR}-${CPACK_PACKAGE_VERSION_PATCH}") diff --git a/dist/etc/network/kelvin-testnet/chain-plasma.cfg b/dist/etc/network/kelvin-testnet/chain-plasma.cfg index 5fed52b..f81cc26 100644 --- a/dist/etc/network/kelvin-testnet/chain-plasma.cfg +++ b/dist/etc/network/kelvin-testnet/chain-plasma.cfg @@ -18,7 +18,9 @@ datum_add_hashes_count=3 # KELT - test token, KEL - main tokem tokens_hold=[KELT,KEL] # 1000 coins for both -tokens_hold_value=[1000000000000000,1000000000000000] +tokens_hold_value=[1000000000,1000000000] +# Confirmations minimum +confirmations_minimum=3 [files] storage_dir=/opt/cellframe-node/var/lib/network/kelvin-testnet/plasma diff --git a/libdap-chain-cs-dag-pos b/libdap-chain-cs-dag-pos index 54a41ae..25a1256 160000 --- a/libdap-chain-cs-dag-pos +++ b/libdap-chain-cs-dag-pos @@ -1 +1 @@ -Subproject commit 54a41ae6f3eb85a5221d35a5376efa5cff02a5d3 +Subproject commit 25a1256e47a85854e143c540fbabc8dc3fe1f7ae diff --git a/sources/main.c b/sources/main.c index 38aa36c..3d3b598 100755 --- a/sources/main.c +++ b/sources/main.c @@ -142,21 +142,21 @@ int main( int argc, const char **argv ) #endif { - char l_log_file_path[MAX_PATH]; + char l_log_file_path [ MAX_PATH ]; #ifdef _WIN32 dap_sprintf(s_sys_dir_path, "%s/%s", regGetUsrPath(), DAP_APP_NAME); l_sys_dir_path_len = strlen(s_sys_dir_path); memcpy(l_log_file_path, s_sys_dir_path, l_sys_dir_path_len); memcpy(s_pid_file_path, s_sys_dir_path, l_sys_dir_path_len); #endif - dap_snprintf(l_log_file_path + l_sys_dir_path_len, sizeof (l_log_file_path), "%s/%s.log", SYSTEM_LOGS_DIR, DAP_APP_NAME); - dap_mkdir_with_parents(SYSTEM_LOGS_DIR); + dap_snprintf( l_log_file_path + l_sys_dir_path_len , sizeof ( l_log_file_path ), "%s/%s.log", SYSTEM_LOGS_DIR , DAP_APP_NAME ); + dap_mkdir_with_parents( SYSTEM_LOGS_DIR ); if ( dap_common_init( DAP_APP_NAME, l_log_file_path ) != 0 ) { printf( "Fatal Error: Can't init common functions module" ); return -2; } - dap_snprintf(s_sys_dir_path + l_sys_dir_path_len, sizeof(s_sys_dir_path), "%s", SYSTEM_CONFIGS_DIR); + dap_snprintf(s_sys_dir_path + l_sys_dir_path_len, sizeof( s_sys_dir_path ), "%s", SYSTEM_CONFIGS_DIR); dap_config_init( s_sys_dir_path ); memset(s_sys_dir_path + l_sys_dir_path_len, '\0', MAX_PATH - l_sys_dir_path_len); if ( (g_config = dap_config_open(DAP_APP_NAME)) == NULL ) { @@ -181,7 +181,7 @@ int main( int argc, const char **argv ) else log_it( L_ATT, "*** NORMAL MODE ***" ); - dap_log_level_set( bDebugMode ? L_DEBUG: L_INFO ); + dap_log_level_set( bDebugMode ? L_DEBUG : L_NOTICE ); log_it( L_DAP, "*** CellFrame Node version: %s ***", DAP_VERSION ); -- GitLab