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
14058225
Commit
14058225
authored
Dec 17, 2019
by
pengjun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
#627 fix linter error
parent
4a057142
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
5 additions
and
9 deletions
+5
-9
table.go
plugin/dapp/collateralize/types/table.go
+3
-5
table.go
plugin/dapp/issuance/types/table.go
+2
-4
No files found.
plugin/dapp/collateralize/types/table.go
View file @
14058225
...
...
@@ -57,7 +57,7 @@ func (tx *CollatetalizeRow) Get(key string) ([]byte, error) {
}
else
if
key
==
"status"
{
return
[]
byte
(
fmt
.
Sprintf
(
"%2d"
,
tx
.
Status
)),
nil
}
else
if
key
==
"addr"
{
return
[]
byte
(
fmt
.
Sprintf
(
"%s"
,
tx
.
AccountAddr
)
),
nil
return
[]
byte
(
tx
.
AccountAddr
),
nil
}
else
if
key
==
"addr_status"
{
return
[]
byte
(
fmt
.
Sprintf
(
"%s:%2d"
,
tx
.
AccountAddr
,
tx
.
Status
)),
nil
}
...
...
@@ -71,9 +71,7 @@ var optRecord = &table.Option{
Index
:
[]
string
{
"status"
,
"addr"
,
"id_status"
,
"id_addr"
},
}
/*
借贷记录表
*/
// NewRecordTable 借贷记录表
func
NewRecordTable
(
kvdb
db
.
KV
)
*
table
.
Table
{
rowmeta
:=
NewRecordRow
()
table
,
err
:=
table
.
NewTable
(
rowmeta
,
kvdb
,
optRecord
)
...
...
@@ -114,7 +112,7 @@ func (tx *CollateralizeRecordRow) Get(key string) ([]byte, error) {
}
else
if
key
==
"status"
{
return
[]
byte
(
fmt
.
Sprintf
(
"%2d"
,
tx
.
Status
)),
nil
}
else
if
key
==
"addr"
{
return
[]
byte
(
fmt
.
Sprintf
(
"%s"
,
tx
.
AccountAddr
)
),
nil
return
[]
byte
(
tx
.
AccountAddr
),
nil
}
else
if
key
==
"id_status"
{
return
[]
byte
(
fmt
.
Sprintf
(
"%s:%2d"
,
tx
.
CollateralizeId
,
tx
.
Status
)),
nil
}
else
if
key
==
"id_addr"
{
...
...
plugin/dapp/issuance/types/table.go
View file @
14058225
...
...
@@ -67,9 +67,7 @@ var optRecord = &table.Option{
Index
:
[]
string
{
"status"
,
"addr"
},
}
/*
大户发行记录表
*/
// NewRecordTable 大户发行记录表
func
NewRecordTable
(
kvdb
db
.
KV
)
*
table
.
Table
{
rowmeta
:=
NewRecordRow
()
table
,
err
:=
table
.
NewTable
(
rowmeta
,
kvdb
,
optRecord
)
...
...
@@ -110,7 +108,7 @@ func (tx *IssuanceRecordRow) Get(key string) ([]byte, error) {
}
else
if
key
==
"status"
{
return
[]
byte
(
fmt
.
Sprintf
(
"%2d"
,
tx
.
Status
)),
nil
}
else
if
key
==
"addr"
{
return
[]
byte
(
fmt
.
Sprintf
(
"%s"
,
tx
.
AccountAddr
)
),
nil
return
[]
byte
(
tx
.
AccountAddr
),
nil
}
return
nil
,
types
.
ErrNotFound
}
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