| 70 | } |
| 71 | |
| 72 | bool CdpNeedSettleInterest(HeightType lastHeight, HeightType curHeight, uint64_t cycleDays) { |
| 73 | uint64_t cycleBlocks = cycleDays * SysCfg().GetOneDayBlocks(curHeight); |
| 74 | return (curHeight > lastHeight) && ((curHeight - lastHeight) >= cycleBlocks); |
| 75 | } |
| 76 | |
| 77 | bool SellInterestForFcoins(CBaseTx &tx, CTxExecuteContext &context, const CUserCDP &cdp, CAccount &cdpAccount, |
| 78 | const uint256 &orderId, const uint64_t scoinsInterest, |
no test coverage detected