Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
plugin
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
JIRA
JIRA
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
link33
plugin
Commits
98d25c0a
Commit
98d25c0a
authored
Feb 03, 2020
by
vipwzw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto ci
parent
242cf907
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
3 deletions
+2
-3
collateralize_test.go
plugin/dapp/collateralize/executor/collateralize_test.go
+0
-1
collateralizedb.go
plugin/dapp/collateralize/executor/collateralizedb.go
+1
-1
issuancedb.go
plugin/dapp/issuance/executor/issuancedb.go
+1
-1
No files found.
plugin/dapp/collateralize/executor/collateralize_test.go
View file @
98d25c0a
...
@@ -556,7 +556,6 @@ func TestCollateralize(t *testing.T) {
...
@@ -556,7 +556,6 @@ func TestCollateralize(t *testing.T) {
types
.
Encode
(
&
pkt
.
ReqCollateralizeRecordByStatus
{
CollateralizeId
:
common
.
ToHex
(
collateralizeID
),
Status
:
4
}))
types
.
Encode
(
&
pkt
.
ReqCollateralizeRecordByStatus
{
CollateralizeId
:
common
.
ToHex
(
collateralizeID
),
Status
:
4
}))
assert
.
Nil
(
t
,
res
)
assert
.
Nil
(
t
,
res
)
// expire liquidate
// expire liquidate
p10
:=
&
pkt
.
CollateralizeBorrowTx
{
p10
:=
&
pkt
.
CollateralizeBorrowTx
{
CollateralizeID
:
common
.
ToHex
(
collateralizeID
),
CollateralizeID
:
common
.
ToHex
(
collateralizeID
),
...
...
plugin/dapp/collateralize/executor/collateralizedb.go
View file @
98d25c0a
...
@@ -548,7 +548,7 @@ func (action *Action) CollateralizeBorrow(borrow *pty.CollateralizeBorrow) (*typ
...
@@ -548,7 +548,7 @@ func (action *Action) CollateralizeBorrow(borrow *pty.CollateralizeBorrow) (*typ
// 借贷金额不超过个人限额
// 借贷金额不超过个人限额
userBalance
,
_
:=
queryCollateralizeUserBalance
(
action
.
db
,
action
.
localDB
,
action
.
fromaddr
)
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
,
clog
.
Error
(
"CollateralizeBorrow"
,
"CollID"
,
coll
.
CollateralizeId
,
"addr"
,
action
.
fromaddr
,
"execaddr"
,
action
.
execaddr
,
"borrow value"
,
borrow
.
GetValue
(),
"current balance"
,
userBalance
,
"error"
,
pty
.
ErrCollateralizeExceedDebtCeiling
)
"borrow value"
,
borrow
.
GetValue
(),
"current balance"
,
userBalance
,
"error"
,
pty
.
ErrCollateralizeExceedDebtCeiling
)
return
nil
,
pty
.
ErrCollateralizeExceedDebtCeiling
return
nil
,
pty
.
ErrCollateralizeExceedDebtCeiling
...
...
plugin/dapp/issuance/executor/issuancedb.go
View file @
98d25c0a
...
@@ -515,7 +515,7 @@ func (action *Action) IssuanceDebt(debt *pty.IssuanceDebt) (*types.Receipt, erro
...
@@ -515,7 +515,7 @@ func (action *Action) IssuanceDebt(debt *pty.IssuanceDebt) (*types.Receipt, erro
// 借贷金额不超过个人限额
// 借贷金额不超过个人限额
userBalance
,
_
:=
queryIssuanceUserBalance
(
action
.
db
,
action
.
localDB
,
action
.
fromaddr
)
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
,
clog
.
Error
(
"IssuanceDebt"
,
"CollID"
,
issu
.
IssuanceId
,
"addr"
,
action
.
fromaddr
,
"execaddr"
,
action
.
execaddr
,
"debt value"
,
debt
.
GetValue
(),
"current balance"
,
userBalance
,
"error"
,
pty
.
ErrIssuanceExceedDebtCeiling
)
"debt value"
,
debt
.
GetValue
(),
"current balance"
,
userBalance
,
"error"
,
pty
.
ErrIssuanceExceedDebtCeiling
)
return
nil
,
pty
.
ErrIssuanceExceedDebtCeiling
return
nil
,
pty
.
ErrIssuanceExceedDebtCeiling
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment