Skip to content
Snippets Groups Projects
Commit 0b09287b authored by Sergei Rashitov's avatar Sergei Rashitov
Browse files

Errors in logic

[*] Fix verification of emission
[*] Fix double reply in  tx_verify
parent 436aaf43
No related branches found
No related tags found
1 merge request!59Errors in logic
...@@ -336,7 +336,7 @@ int dap_chain_ledger_token_emission_add_check(dap_ledger_t *a_ledger, const dap_ ...@@ -336,7 +336,7 @@ int dap_chain_ledger_token_emission_add_check(dap_ledger_t *a_ledger, const dap_
log_it(L_ERROR, "Can't add token emission datum of %llu %s ( 0x%s ): already present in cache", log_it(L_ERROR, "Can't add token emission datum of %llu %s ( 0x%s ): already present in cache",
a_token_emission->hdr.value, c_token_ticker, l_hash_str); a_token_emission->hdr.value, c_token_ticker, l_hash_str);
ret = -1; ret = -1;
}else if ( (! l_token_item) && ( HASH_COUNT( l_ledger_priv->treshold_emissions) < s_treshold_emissions_max )) { }else if ( (! l_token_item) && ( HASH_COUNT( l_ledger_priv->treshold_emissions) >= s_treshold_emissions_max )) {
log_it(L_WARNING,"Treshold for emissions is overfulled (%lu max)", log_it(L_WARNING,"Treshold for emissions is overfulled (%lu max)",
s_treshold_emissions_max); s_treshold_emissions_max);
ret = -2; ret = -2;
......
...@@ -3540,7 +3540,7 @@ int com_tx_verify(int argc, char ** argv, void *arg_func, char **str_reply) ...@@ -3540,7 +3540,7 @@ int com_tx_verify(int argc, char ** argv, void *arg_func, char **str_reply)
if(str_reply) if(str_reply)
dap_chain_node_cli_set_reply_text(str_reply, "command \"%s\" not recognized", argv[1]); dap_chain_node_cli_set_reply_text(str_reply, "command \"%s\" not recognized", argv[1]);
} }
if(str_reply) else if(str_reply)
dap_chain_node_cli_set_reply_text(str_reply, "command not defined, enter \"help <cmd name>\""); dap_chain_node_cli_set_reply_text(str_reply, "command not defined, enter \"help <cmd name>\"");
return -1; return -1;
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment