From 65aefb605f70ae8ed659f5f3d8c009bbde2fbb97 Mon Sep 17 00:00:00 2001 From: "roman.khlopkov" <roman.khlopkov@demlabs.net> Date: Mon, 24 Jun 2024 14:25:34 +0300 Subject: [PATCH] [*] ESBOCS signs structure check segfault fix --- modules/consensus/esbocs/dap_chain_cs_esbocs.c | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/modules/consensus/esbocs/dap_chain_cs_esbocs.c b/modules/consensus/esbocs/dap_chain_cs_esbocs.c index 890e3b43eb..7cf43b8c92 100644 --- a/modules/consensus/esbocs/dap_chain_cs_esbocs.c +++ b/modules/consensus/esbocs/dap_chain_cs_esbocs.c @@ -825,9 +825,13 @@ static dap_list_t *s_get_validators_list(dap_chain_esbocs_t *a_esbocs, dap_hash_ l_excluded_num = a_excluded_list[++l_excluded_list_idx]; } } - } else - l_validators = dap_chain_net_srv_stake_get_validators(a_esbocs->chain->net_id, true, - &a_esbocs->session->cur_round.excluded_list); + } else { + l_validators = dap_chain_net_srv_stake_get_validators(a_esbocs->chain->net_id, + true, + a_esbocs->session + ? &a_esbocs->session->cur_round.excluded_list + : NULL); + } uint16_t l_total_validators_count = dap_list_length(l_validators); if (l_total_validators_count < l_esbocs_pvt->min_validators_count) { log_it(L_MSG, "Can't start new round. Totally active validators count %hu is below minimum count %hu", -- GitLab