Skip to content

Commit 0920185

Browse files
committed
fix: HF
1 parent 2cdd301 commit 0920185

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

debts/engine.go

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -413,6 +413,10 @@ func (eng *DebtEngine) CalculateSessionDebt(blockNum int64, session *schemas.Cre
413413
eng.lastParameters[session.CreditManager].FeeInterest,
414414
true,
415415
)
416+
if calHF.Cmp(big.NewInt(65535)) > 0 {
417+
log.Warn("HF for session", sessionId, "is more than 65535", calHF, "at", blockNum)
418+
calHF = big.NewInt(65535)
419+
}
416420

417421
// the value of credit account is in terms of underlying asset
418422
// set debt fields

0 commit comments

Comments
 (0)