Commit 14058225 authored by pengjun's avatar pengjun

#627 fix linter error

parent 4a057142
...@@ -57,7 +57,7 @@ func (tx *CollatetalizeRow) Get(key string) ([]byte, error) { ...@@ -57,7 +57,7 @@ func (tx *CollatetalizeRow) Get(key string) ([]byte, error) {
} else if key == "status" { } else if key == "status" {
return []byte(fmt.Sprintf("%2d", tx.Status)), nil return []byte(fmt.Sprintf("%2d", tx.Status)), nil
} else if key == "addr" { } else if key == "addr" {
return []byte(fmt.Sprintf("%s", tx.AccountAddr)), nil return []byte(tx.AccountAddr), nil
} else if key == "addr_status" { } else if key == "addr_status" {
return []byte(fmt.Sprintf("%s:%2d", tx.AccountAddr, tx.Status)), nil return []byte(fmt.Sprintf("%s:%2d", tx.AccountAddr, tx.Status)), nil
} }
...@@ -71,9 +71,7 @@ var optRecord = &table.Option{ ...@@ -71,9 +71,7 @@ var optRecord = &table.Option{
Index: []string{"status", "addr", "id_status", "id_addr"}, Index: []string{"status", "addr", "id_status", "id_addr"},
} }
/* // NewRecordTable 借贷记录表
借贷记录表
*/
func NewRecordTable(kvdb db.KV) *table.Table { func NewRecordTable(kvdb db.KV) *table.Table {
rowmeta := NewRecordRow() rowmeta := NewRecordRow()
table, err := table.NewTable(rowmeta, kvdb, optRecord) table, err := table.NewTable(rowmeta, kvdb, optRecord)
...@@ -114,7 +112,7 @@ func (tx *CollateralizeRecordRow) Get(key string) ([]byte, error) { ...@@ -114,7 +112,7 @@ func (tx *CollateralizeRecordRow) Get(key string) ([]byte, error) {
} else if key == "status" { } else if key == "status" {
return []byte(fmt.Sprintf("%2d", tx.Status)), nil return []byte(fmt.Sprintf("%2d", tx.Status)), nil
} else if key == "addr" { } else if key == "addr" {
return []byte(fmt.Sprintf("%s", tx.AccountAddr)), nil return []byte( tx.AccountAddr), nil
} else if key == "id_status" { } else if key == "id_status" {
return []byte(fmt.Sprintf("%s:%2d", tx.CollateralizeId, tx.Status)), nil return []byte(fmt.Sprintf("%s:%2d", tx.CollateralizeId, tx.Status)), nil
} else if key == "id_addr" { } else if key == "id_addr" {
......
...@@ -67,9 +67,7 @@ var optRecord = &table.Option{ ...@@ -67,9 +67,7 @@ var optRecord = &table.Option{
Index: []string{"status", "addr"}, Index: []string{"status", "addr"},
} }
/* // NewRecordTable 大户发行记录表
大户发行记录表
*/
func NewRecordTable(kvdb db.KV) *table.Table { func NewRecordTable(kvdb db.KV) *table.Table {
rowmeta := NewRecordRow() rowmeta := NewRecordRow()
table, err := table.NewTable(rowmeta, kvdb, optRecord) table, err := table.NewTable(rowmeta, kvdb, optRecord)
...@@ -110,7 +108,7 @@ func (tx *IssuanceRecordRow) Get(key string) ([]byte, error) { ...@@ -110,7 +108,7 @@ func (tx *IssuanceRecordRow) Get(key string) ([]byte, error) {
} else if key == "status" { } else if key == "status" {
return []byte(fmt.Sprintf("%2d", tx.Status)), nil return []byte(fmt.Sprintf("%2d", tx.Status)), nil
} else if key == "addr" { } else if key == "addr" {
return []byte(fmt.Sprintf("%s", tx.AccountAddr)), nil return []byte(tx.AccountAddr), nil
} }
return nil, types.ErrNotFound return nil, types.ErrNotFound
} }
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