MCPcopy Create free account
hub / github.com/WaykiChain/WaykiChain / CdpNeedSettleInterest

Function CdpNeedSettleInterest

src/tx/cdptx.cpp:72–75  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

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,

Callers 2

ExecuteTxMethod · 0.85
GetSettledInterestCdpsFunction · 0.85

Calls 1

GetOneDayBlocksMethod · 0.80

Tested by

no test coverage detected