| 962 | } |
| 963 | |
| 964 | bool CDealItemExecuter::CalcMatchFee(const uint256 &orderId, const CDEXOrderDetail &order, |
| 965 | const COrderOperatorParams &orderOperatorParams, |
| 966 | const OrderSide &takerSide, uint64_t amount, |
| 967 | uint64_t &orderFee) { |
| 968 | |
| 969 | uint64_t feeRatio = GetOperatorFeeRatio(order, orderOperatorParams, takerSide); |
| 970 | if (!CheckOperatorFeeRatioRange(context, orderId, feeRatio, DEAL_ITEM_TITLE)) |
| 971 | return false; |
| 972 | if (!CalcAmountByRatio(amount, feeRatio, PRICE_BOOST, orderFee)) |
| 973 | return context.pState->DoS(100, ERRORMSG("%s, the calc_deal_fee overflow! amount=%llu, " |
| 974 | "fee_ratio=%llu, side=%s", DEAL_ITEM_TITLE, amount, feeRatio, |
| 975 | kOrderSideHelper.GetName(order.order_side)), |
| 976 | REJECT_INVALID, "calc-deal-fee-overflow"); |
| 977 | return true; |
| 978 | } |
| 979 | |
| 980 | bool CDealItemExecuter::CalcWusdFrictionFee(uint64_t amount, uint64_t &frictionFee) { |
| 981 | uint64_t frictionFeeRatio; |
nothing calls this directly
no test coverage detected