Commit 7c308c64 authored by linj's avatar linj

fix

parent 6714f976
...@@ -6,6 +6,7 @@ package executor ...@@ -6,6 +6,7 @@ package executor
import ( import (
"fmt" "fmt"
"encoding/hex"
"strconv" "strconv"
"github.com/33cn/chain33/common" "github.com/33cn/chain33/common"
...@@ -282,10 +283,10 @@ func (t *trade) genSellMarket(tx *types.Transaction, sell *pty.ReceiptSellBase, ...@@ -282,10 +283,10 @@ func (t *trade) genSellMarket(tx *types.Transaction, sell *pty.ReceiptSellBase,
TradedBoardlot: sell.SoldBoardlot, TradedBoardlot: sell.SoldBoardlot,
BuyID: sell.BuyID, BuyID: sell.BuyID,
Status: pty.TradeOrderStatusSoldOut, Status: pty.TradeOrderStatusSoldOut,
SellID: calcTokenSellID(common.Bytes2Hex(tx.Hash())), SellID: calcTokenSellID(hex.EncodeToString(tx.Hash())),
TxHash: []string{common.ToHex(tx.Hash())}, TxHash: []string{common.ToHex(tx.Hash())},
Height: sell.Height, Height: sell.Height,
Key: calcTokenSellID(common.Bytes2Hex(tx.Hash())), Key: calcTokenSellID(hex.EncodeToString(tx.Hash())),
BlockTime: t.GetBlockTime(), BlockTime: t.GetBlockTime(),
IsSellOrder: true, IsSellOrder: true,
AssetExec: sell.AssetExec, AssetExec: sell.AssetExec,
...@@ -379,12 +380,12 @@ func (t *trade) genBuyMarket(tx *types.Transaction, buy *pty.ReceiptBuyBase, txI ...@@ -379,12 +380,12 @@ func (t *trade) genBuyMarket(tx *types.Transaction, buy *pty.ReceiptBuyBase, txI
PricePerBoardlot: parseOrderPriceFloat(buy.PricePerBoardlot), PricePerBoardlot: parseOrderPriceFloat(buy.PricePerBoardlot),
TotalBoardlot: buy.TotalBoardlot, TotalBoardlot: buy.TotalBoardlot,
TradedBoardlot: buy.BoughtBoardlot, TradedBoardlot: buy.BoughtBoardlot,
BuyID: calcTokenBuyID(common.Bytes2Hex(tx.Hash())), BuyID: calcTokenBuyID(hex.EncodeToString(tx.Hash())),
Status: pty.TradeOrderStatusBoughtOut, Status: pty.TradeOrderStatusBoughtOut,
SellID: buy.SellID, SellID: buy.SellID,
TxHash: []string{common.ToHex(tx.Hash())}, TxHash: []string{common.ToHex(tx.Hash())},
Height: buy.Height, Height: buy.Height,
Key: calcTokenBuyID(common.Bytes2Hex(tx.Hash())), Key: calcTokenBuyID(hex.EncodeToString(tx.Hash())),
BlockTime: t.GetBlockTime(), BlockTime: t.GetBlockTime(),
IsSellOrder: true, IsSellOrder: true,
AssetExec: buy.AssetExec, AssetExec: buy.AssetExec,
......
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