Commit 29817135 authored by pengjun's avatar pengjun

Merge branch 'master' of https://github.com/jpeng-go/plugin

parents 238360b5 aba0602a
......@@ -586,7 +586,6 @@ func TestCollateralize(t *testing.T) {
types.Encode(&pkt.ReqCollateralizeRecordByStatus{CollateralizeId: common.ToHex(collateralizeID), Status: 4}))
assert.Nil(t, res)
// expire liquidate
p10 := &pkt.CollateralizeBorrowTx{
CollateralizeID: common.ToHex(collateralizeID),
......
......@@ -548,7 +548,7 @@ func (action *Action) CollateralizeBorrow(borrow *pty.CollateralizeBorrow) (*typ
// 借贷金额不超过个人限额
userBalance, _ := queryCollateralizeUserBalance(action.db, action.localDB, action.fromaddr)
if borrow.GetValue() + userBalance > coll.DebtCeiling {
if borrow.GetValue()+userBalance > coll.DebtCeiling {
clog.Error("CollateralizeBorrow", "CollID", coll.CollateralizeId, "addr", action.fromaddr, "execaddr", action.execaddr,
"borrow value", borrow.GetValue(), "current balance", userBalance, "error", pty.ErrCollateralizeExceedDebtCeiling)
return nil, pty.ErrCollateralizeExceedDebtCeiling
......
......@@ -515,7 +515,7 @@ func (action *Action) IssuanceDebt(debt *pty.IssuanceDebt) (*types.Receipt, erro
// 借贷金额不超过个人限额
userBalance, _ := queryIssuanceUserBalance(action.db, action.localDB, action.fromaddr)
if debt.GetValue() + userBalance > issu.DebtCeiling {
if debt.GetValue()+userBalance > issu.DebtCeiling {
clog.Error("IssuanceDebt", "CollID", issu.IssuanceId, "addr", action.fromaddr, "execaddr", action.execaddr,
"debt value", debt.GetValue(), "current balance", userBalance, "error", pty.ErrIssuanceExceedDebtCeiling)
return nil, pty.ErrIssuanceExceedDebtCeiling
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment