diff --git a/dap-sdk b/dap-sdk index ed843942559bcb1f344ad9e9dc28ea6db0ee9937..fef9c1e0ed18345ba26aa8ffe610cc83a55899f2 160000 --- a/dap-sdk +++ b/dap-sdk @@ -1 +1 @@ -Subproject commit ed843942559bcb1f344ad9e9dc28ea6db0ee9937 +Subproject commit fef9c1e0ed18345ba26aa8ffe610cc83a55899f2 diff --git a/modules/chain/dap_chain_cell.c b/modules/chain/dap_chain_cell.c index 671a4f7195349e77cb3363553fba9646df1d382a..3c14f7e50ab4fe9ae03eb8730485511c17ab642b 100644 --- a/modules/chain/dap_chain_cell.c +++ b/modules/chain/dap_chain_cell.c @@ -140,7 +140,7 @@ dap_chain_cell_t * dap_chain_cell_create_fill(dap_chain_t * a_chain, dap_chain_c l_cell = DAP_NEW_Z(dap_chain_cell_t); *l_cell = (dap_chain_cell_t) { - .id = a_cell_id.uint64, + .id = a_cell_id, .map = l_map, .map_pos = l_map, .map_end = l_map ? l_map + l_size : NULL, diff --git a/modules/consensus/esbocs/dap_chain_cs_esbocs.c b/modules/consensus/esbocs/dap_chain_cs_esbocs.c index 566f77eefa820b9c20101db95710c3180d4d93f5..948fe73c2f8f6237b3d57119795ed7758fef3a95 100644 --- a/modules/consensus/esbocs/dap_chain_cs_esbocs.c +++ b/modules/consensus/esbocs/dap_chain_cs_esbocs.c @@ -2338,6 +2338,15 @@ static void s_session_packet_in(dap_chain_esbocs_session_t *a_session, dap_chain case DAP_CHAIN_ESBOCS_MSG_TYPE_SUBMIT: { uint8_t *l_candidate = l_message_data; size_t l_candidate_size = l_message_data_size; + // check for NULL candidate + if (!l_candidate_size || dap_hash_fast_is_blank(&l_message->hdr.candidate_hash)) { + debug_if(l_cs_debug, L_MSG, "net:%s, chain:%s, round:%"DAP_UINT64_FORMAT_U", attempt:%hhu." + " Receive SUBMIT candidate NULL", + l_session->chain->net_name, l_session->chain->name, + l_session->cur_round.id, l_message->hdr.attempt_num); + s_session_attempt_new(l_session); + break; + } // check submission rights if (s_block_is_emergency((dap_chain_block_t *)l_candidate, l_candidate_size)) { if (!s_check_emergency_rights(l_session->esbocs, &l_signing_addr)) { @@ -2350,15 +2359,6 @@ static void s_session_packet_in(dap_chain_esbocs_session_t *a_session, dap_chain } l_session->cur_round.attempt_submit_validator = l_signing_addr; } - // check for NULL candidate - if (!l_candidate_size || dap_hash_fast_is_blank(&l_message->hdr.candidate_hash)) { - debug_if(l_cs_debug, L_MSG, "net:%s, chain:%s, round:%"DAP_UINT64_FORMAT_U", attempt:%hhu." - " Receive SUBMIT candidate NULL", - l_session->chain->net_name, l_session->chain->name, - l_session->cur_round.id, l_message->hdr.attempt_num); - s_session_attempt_new(l_session); - break; - } // check candidate hash dap_chain_hash_fast_t l_check_hash; dap_hash_fast(l_candidate, l_candidate_size, &l_check_hash);