From 107a5676616c9f0da28c35096cf38f94be42d57c Mon Sep 17 00:00:00 2001 From: "alexey.stratulat" <alexey.stratulat@demlabs.net> Date: Tue, 22 Aug 2023 17:57:57 +0700 Subject: [PATCH] [*] Changed the condition to return the opportunity for reinvestment at 0 percent stake. --- modules/service/stake/dap_chain_net_srv_stake_lock.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/modules/service/stake/dap_chain_net_srv_stake_lock.c b/modules/service/stake/dap_chain_net_srv_stake_lock.c index 2b01281942..25e102506d 100644 --- a/modules/service/stake/dap_chain_net_srv_stake_lock.c +++ b/modules/service/stake/dap_chain_net_srv_stake_lock.c @@ -289,7 +289,7 @@ static enum error_code s_cli_hold(int a_argc, char **a_argv, int a_arg_index, da return REINVEST_ARG_ERROR; if (IS_ZERO_256(l_reinvest_percent)) { int l_reinvest_percent_int = atoi(l_reinvest_percent_str); - if (l_reinvest_percent_int <= 0 || l_reinvest_percent_int > 100) + if (l_reinvest_percent_int < 0 || l_reinvest_percent_int > 100) return REINVEST_ARG_ERROR; l_reinvest_percent = dap_chain_uint256_from(l_reinvest_percent_int); MULT_256_256(l_reinvest_percent, GET_256_FROM_64(1000000000000000000ULL), &l_reinvest_percent); @@ -658,7 +658,7 @@ static void s_error_handler(enum error_code errorCode, dap_string_t *output_line } break; case REINVEST_ARG_ERROR: { - dap_string_append_printf(output_line, "reinvestment is set as a percentage from 1 to 100"); + dap_string_append_printf(output_line, "reinvestment is set as a percentage from 0 to 100"); } break; case FEE_ARG_ERROR: { -- GitLab