diff --git a/modules/channel/chain/dap_stream_ch_chain.c b/modules/channel/chain/dap_stream_ch_chain.c index e0b6be276ab48d248816c6924b287067ff67f8fb..47f8fc81c08ebc55bf1c3e736bf593936384ea8b 100644 --- a/modules/channel/chain/dap_stream_ch_chain.c +++ b/modules/channel/chain/dap_stream_ch_chain.c @@ -853,6 +853,7 @@ static bool s_chain_timer_callback(void *a_arg) l_ch_chain->request_hdr.net_id.uint64, l_ch_chain->request_hdr.chain_id.uint64, l_ch_chain->request_hdr.cell_id.uint64, NULL, 0); l_ch_chain->sent_breaks = 0; + l_ch_chain->timer_shots = 0; } if (l_ch_chain->state == CHAIN_STATE_SYNC_GLOBAL_DB && l_ch_chain->sent_breaks >= 3 * DAP_SYNC_TICKS_PER_SECOND) { debug_if(s_debug_more, L_INFO, "Send one global_db TSD packet (rest=%zu/%zu items)", @@ -862,6 +863,7 @@ static bool s_chain_timer_callback(void *a_arg) l_ch_chain->request_hdr.net_id.uint64, l_ch_chain->request_hdr.chain_id.uint64, l_ch_chain->request_hdr.cell_id.uint64, NULL, 0); l_ch_chain->sent_breaks = 0; + l_ch_chain->timer_shots = 0; } return true; } diff --git a/modules/channel/chain/include/dap_stream_ch_chain.h b/modules/channel/chain/include/dap_stream_ch_chain.h index 51ba11c3a27352644dfd86887a45c8b2c32469d9..b0542a834c6a4d7433f062182134795bd45dd8d5 100644 --- a/modules/channel/chain/include/dap_stream_ch_chain.h +++ b/modules/channel/chain/include/dap_stream_ch_chain.h @@ -34,7 +34,7 @@ #include "uthash.h" #include "dap_global_db_remote.h" -#define DAP_CHAIN_NODE_SYNC_TIMEOUT 30 // sec +#define DAP_CHAIN_NODE_SYNC_TIMEOUT 60 // sec #define DAP_SYNC_TICKS_PER_SECOND 10 typedef struct dap_stream_ch_chain dap_stream_ch_chain_t; diff --git a/modules/consensus/esbocs/dap_chain_cs_esbocs.c b/modules/consensus/esbocs/dap_chain_cs_esbocs.c index 83e52504dece8861cc54e57557788ff89de2e3a1..7633b717a47172897fd426747571bb78d7d12ec5 100644 --- a/modules/consensus/esbocs/dap_chain_cs_esbocs.c +++ b/modules/consensus/esbocs/dap_chain_cs_esbocs.c @@ -463,7 +463,7 @@ static int s_callback_created(dap_chain_t *a_chain, dap_config_t *a_chain_net_cf dap_chain_add_callback_notify(a_chain, s_new_atom_notifier, l_session); s_session_round_new(l_session); - log_it(L_INFO, "init session for net:%s, chain:%s", a_chain->net_name, a_chain->name); + log_it(L_INFO, "Init session for net:%s, chain:%s", a_chain->net_name, a_chain->name); DL_APPEND(s_session_items, l_session); if (!s_session_cs_timer) { s_session_cs_timer = dap_timerfd_start(1000, s_session_timer, NULL); diff --git a/modules/net/dap_chain_net.c b/modules/net/dap_chain_net.c index 4d2193d83154b34d34495f476036ef1ffcb26843..c642c468154ca296e1c12fe133e3ab39b42d5339 100644 --- a/modules/net/dap_chain_net.c +++ b/modules/net/dap_chain_net.c @@ -469,7 +469,7 @@ int dap_chain_net_add_downlink(dap_chain_net_t *a_net, dap_stream_worker_t *a_wo return -2; } l_downlink = DAP_NEW_Z(struct downlink); - if (l_downlink) { + if (!l_downlink) { log_it(L_ERROR, "Memory allocation error in dap_chain_net_add_downlink"); pthread_rwlock_unlock(&l_net_pvt->downlinks_lock); return -1;