Skip to content
Snippets Groups Projects

hotfix-11399_port_to_rc

Merged daniil.frolov requested to merge hotfix-11399_port_to_rc into release-5.3
1 file
+ 5
3
Compare changes
  • Side-by-side
  • Inline
@@ -794,7 +794,7 @@ static bool s_pay_verificator_callback(dap_ledger_t * a_ledger, dap_chain_tx_out
return false;
}
if( compare256(uint256_0, l_prev_out_cond->subtype.srv_pay.unit_price_max_datoshi) &&
if( !IS_ZERO_256(l_prev_out_cond->subtype.srv_pay.unit_price_max_datoshi) &&
compare256(l_unit_price, l_prev_out_cond->subtype.srv_pay.unit_price_max_datoshi) > 0){
log_it(L_ERROR, "Value in receipt is exceed max allowable price.");
return false;
@@ -820,7 +820,7 @@ static bool s_pay_verificator_callback(dap_ledger_t * a_ledger, dap_chain_tx_out
case TX_ITEM_TYPE_OUT_COND: {
dap_chain_tx_out_cond_t *l_tx_out = (dap_chain_tx_out_cond_t *)l_list_tmp->data;
if (l_tx_out->header.subtype == DAP_CHAIN_TX_OUT_COND_SUBTYPE_FEE){
SUM_256_256(l_value, l_cond_out_value = l_tx_out->header.value, &l_value);
SUM_256_256(l_value, l_tx_out->header.value, &l_value);
} else if (l_tx_out->header.subtype == DAP_CHAIN_TX_OUT_COND_SUBTYPE_SRV_PAY){
l_cond_out_value = l_tx_out->header.value;
}
@@ -829,7 +829,9 @@ static bool s_pay_verificator_callback(dap_ledger_t * a_ledger, dap_chain_tx_out
}
}
if (!compare256(l_value, l_cond_out_value)){
SUBTRACT_256_256(l_prev_out_cond->header.value, l_value, &l_value);
if (compare256(l_value, l_cond_out_value)){
log_it(L_ERROR, "Value in tx out is invalid!");
dap_list_free(l_list_out);
return false;
Loading