Commit eee32aab authored by vipwzw's avatar vipwzw

auto ci

parent 7c308c64
...@@ -5,8 +5,8 @@ ...@@ -5,8 +5,8 @@
package executor package executor
import ( import (
"fmt"
"encoding/hex" "encoding/hex"
"fmt"
"strconv" "strconv"
"github.com/33cn/chain33/common" "github.com/33cn/chain33/common"
...@@ -146,7 +146,7 @@ func (r *OrderRow) isFinished() int { ...@@ -146,7 +146,7 @@ func (r *OrderRow) isFinished() int {
// 进行中, 撤销, 部分成交 , 全部成交, 完成状态统一前缀. 数字和原来不一样 // 进行中, 撤销, 部分成交 , 全部成交, 完成状态统一前缀. 数字和原来不一样
// 01 10 11 12 19 -> 1* // 01 10 11 12 19 -> 1*
func (r *OrderRow) status() string { func (r *OrderRow) status() string {
if r.Status == pty.TradeOrderStatusOnBuy || r.Status == pty.TradeOrderStatusOnSale{ if r.Status == pty.TradeOrderStatusOnBuy || r.Status == pty.TradeOrderStatusOnSale {
return "01" // 试图用1 可以匹配所有完成的 return "01" // 试图用1 可以匹配所有完成的
} else if r.Status == pty.TradeOrderStatusSoldOut || r.Status == pty.TradeOrderStatusBoughtOut { } else if r.Status == pty.TradeOrderStatusSoldOut || r.Status == pty.TradeOrderStatusBoughtOut {
return "12" return "12"
......
package executor package executor
import ( import (
pty "github.com/33cn/plugin/plugin/dapp/trade/types"
"github.com/33cn/chain33/system/dapp"
"testing" "testing"
"github.com/33cn/chain33/system/dapp"
pty "github.com/33cn/plugin/plugin/dapp/trade/types"
//"github.com/33cn/chain33/common/db" //"github.com/33cn/chain33/common/db"
//"github.com/33cn/chain33/common/db/table" //"github.com/33cn/chain33/common/db/table"
"github.com/33cn/chain33/util" "github.com/33cn/chain33/util"
...@@ -52,7 +53,6 @@ var order2 = &pty.LocalOrder{ ...@@ -52,7 +53,6 @@ var order2 = &pty.LocalOrder{
IsFinished: false, IsFinished: false,
} }
func TestListAll(t *testing.T) { func TestListAll(t *testing.T) {
dir, ldb, tdb := util.CreateTestDB() dir, ldb, tdb := util.CreateTestDB()
t.Log(dir, ldb, tdb) t.Log(dir, ldb, tdb)
......
...@@ -662,7 +662,6 @@ func (t *trade) GetOnesOrderWithStatusV1(req *pty.ReqAddrAssets) (types.Message, ...@@ -662,7 +662,6 @@ func (t *trade) GetOnesOrderWithStatusV1(req *pty.ReqAddrAssets) (types.Message,
return nil, types.ErrInvalidParam return nil, types.ErrInvalidParam
} }
keys, err := t.GetLocalDB().List(calcOnesOrderPrefixStatus(req.Addr, orderStatus), fromKey, req.Count, req.Direction) keys, err := t.GetLocalDB().List(calcOnesOrderPrefixStatus(req.Addr, orderStatus), fromKey, req.Count, req.Direction)
if err != nil { if err != nil {
return nil, err return nil, err
......
This diff is collapsed.
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