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
56a6b283
Commit
56a6b283
authored
Sep 03, 2019
by
linj
Committed by
vipwzw
Sep 05, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fix local db
parent
edd10bb1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
8 deletions
+8
-8
localdb_v1.go
plugin/dapp/trade/executor/localdb_v1.go
+8
-8
No files found.
plugin/dapp/trade/executor/localdb_v1.go
View file @
56a6b283
...
@@ -13,7 +13,7 @@ import (
...
@@ -13,7 +13,7 @@ import (
// sell limit
// sell limit
func
genSaveSellKv
(
sellorder
*
pty
.
SellOrder
)
[]
*
types
.
KeyValue
{
func
genSaveSellKv
(
sellorder
*
pty
.
SellOrder
)
[]
*
types
.
KeyValue
{
if
sellorder
.
PriceExec
!=
defaultPriceExec
{
if
sellorder
.
PriceExec
!=
""
&&
sellorder
.
PriceExec
!=
defaultPriceExec
{
return
nil
return
nil
}
}
status
:=
sellorder
.
Status
status
:=
sellorder
.
Status
...
@@ -58,7 +58,7 @@ func genSellOrderKeyValue(kv []*types.KeyValue, sellorder *pty.SellOrder, status
...
@@ -58,7 +58,7 @@ func genSellOrderKeyValue(kv []*types.KeyValue, sellorder *pty.SellOrder, status
// buy market
// buy market
func
saveBuyMarketOrderKeyValue
(
kv
[]
*
types
.
KeyValue
,
receipt
*
pty
.
ReceiptBuyBase
,
status
int32
,
height
int64
)
[]
*
types
.
KeyValue
{
func
saveBuyMarketOrderKeyValue
(
kv
[]
*
types
.
KeyValue
,
receipt
*
pty
.
ReceiptBuyBase
,
status
int32
,
height
int64
)
[]
*
types
.
KeyValue
{
if
receipt
.
PriceExec
!=
defaultPriceExec
{
if
receipt
.
PriceExec
!=
""
&&
receipt
.
PriceExec
!=
defaultPriceExec
{
return
nil
return
nil
}
}
...
@@ -105,7 +105,7 @@ func genBuyMarketOrderKeyValue(kv []*types.KeyValue, receipt *pty.ReceiptBuyBase
...
@@ -105,7 +105,7 @@ func genBuyMarketOrderKeyValue(kv []*types.KeyValue, receipt *pty.ReceiptBuyBase
// buy limit
// buy limit
func
genSaveBuyLimitKv
(
buyOrder
*
pty
.
BuyLimitOrder
)
[]
*
types
.
KeyValue
{
func
genSaveBuyLimitKv
(
buyOrder
*
pty
.
BuyLimitOrder
)
[]
*
types
.
KeyValue
{
if
buyOrder
.
PriceExec
!=
defaultPriceExec
{
if
buyOrder
.
PriceExec
!=
""
&&
buyOrder
.
PriceExec
!=
defaultPriceExec
{
return
nil
return
nil
}
}
...
@@ -151,7 +151,7 @@ func genBuyLimitOrderKeyValue(kv []*types.KeyValue, buyOrder *pty.BuyLimitOrder,
...
@@ -151,7 +151,7 @@ func genBuyLimitOrderKeyValue(kv []*types.KeyValue, buyOrder *pty.BuyLimitOrder,
// sell market
// sell market
func
saveSellMarketOrderKeyValue
(
kv
[]
*
types
.
KeyValue
,
receipt
*
pty
.
ReceiptSellBase
,
status
int32
,
height
int64
)
[]
*
types
.
KeyValue
{
func
saveSellMarketOrderKeyValue
(
kv
[]
*
types
.
KeyValue
,
receipt
*
pty
.
ReceiptSellBase
,
status
int32
,
height
int64
)
[]
*
types
.
KeyValue
{
if
receipt
.
PriceExec
!=
defaultPriceExec
{
if
receipt
.
PriceExec
!=
""
&&
receipt
.
PriceExec
!=
defaultPriceExec
{
return
nil
return
nil
}
}
txhash
:=
[]
byte
(
receipt
.
TxHash
)
txhash
:=
[]
byte
(
receipt
.
TxHash
)
...
@@ -161,7 +161,7 @@ func saveSellMarketOrderKeyValue(kv []*types.KeyValue, receipt *pty.ReceiptSellB
...
@@ -161,7 +161,7 @@ func saveSellMarketOrderKeyValue(kv []*types.KeyValue, receipt *pty.ReceiptSellB
// delete part
// delete part
// sell limit
// sell limit
func
genDeleteSellKv
(
sellorder
*
pty
.
SellOrder
)
[]
*
types
.
KeyValue
{
func
genDeleteSellKv
(
sellorder
*
pty
.
SellOrder
)
[]
*
types
.
KeyValue
{
if
sellorder
.
PriceExec
!=
defaultPriceExec
{
if
sellorder
.
PriceExec
!=
""
&&
sellorder
.
PriceExec
!=
defaultPriceExec
{
return
nil
return
nil
}
}
status
:=
sellorder
.
Status
status
:=
sellorder
.
Status
...
@@ -176,7 +176,7 @@ func genDeleteSellKv(sellorder *pty.SellOrder) []*types.KeyValue {
...
@@ -176,7 +176,7 @@ func genDeleteSellKv(sellorder *pty.SellOrder) []*types.KeyValue {
// buy market
// buy market
func
deleteBuyMarketOrderKeyValue
(
kv
[]
*
types
.
KeyValue
,
receipt
*
pty
.
ReceiptBuyBase
,
status
int32
,
height
int64
)
[]
*
types
.
KeyValue
{
func
deleteBuyMarketOrderKeyValue
(
kv
[]
*
types
.
KeyValue
,
receipt
*
pty
.
ReceiptBuyBase
,
status
int32
,
height
int64
)
[]
*
types
.
KeyValue
{
if
receipt
.
PriceExec
!=
defaultPriceExec
{
if
receipt
.
PriceExec
!=
""
&&
receipt
.
PriceExec
!=
defaultPriceExec
{
return
nil
return
nil
}
}
return
genBuyMarketOrderKeyValue
(
kv
,
receipt
,
status
,
height
,
nil
)
return
genBuyMarketOrderKeyValue
(
kv
,
receipt
,
status
,
height
,
nil
)
...
@@ -184,7 +184,7 @@ func deleteBuyMarketOrderKeyValue(kv []*types.KeyValue, receipt *pty.ReceiptBuyB
...
@@ -184,7 +184,7 @@ func deleteBuyMarketOrderKeyValue(kv []*types.KeyValue, receipt *pty.ReceiptBuyB
// buy limit
// buy limit
func
genDeleteBuyLimitKv
(
buyOrder
*
pty
.
BuyLimitOrder
)
[]
*
types
.
KeyValue
{
func
genDeleteBuyLimitKv
(
buyOrder
*
pty
.
BuyLimitOrder
)
[]
*
types
.
KeyValue
{
if
buyOrder
.
PriceExec
!=
defaultPriceExec
{
if
buyOrder
.
PriceExec
!=
""
&&
buyOrder
.
PriceExec
!=
defaultPriceExec
{
return
nil
return
nil
}
}
status
:=
buyOrder
.
Status
status
:=
buyOrder
.
Status
...
@@ -199,7 +199,7 @@ func genDeleteBuyLimitKv(buyOrder *pty.BuyLimitOrder) []*types.KeyValue {
...
@@ -199,7 +199,7 @@ func genDeleteBuyLimitKv(buyOrder *pty.BuyLimitOrder) []*types.KeyValue {
// sell market
// sell market
func
deleteSellMarketOrderKeyValue
(
kv
[]
*
types
.
KeyValue
,
receipt
*
pty
.
ReceiptSellBase
,
status
int32
,
height
int64
)
[]
*
types
.
KeyValue
{
func
deleteSellMarketOrderKeyValue
(
kv
[]
*
types
.
KeyValue
,
receipt
*
pty
.
ReceiptSellBase
,
status
int32
,
height
int64
)
[]
*
types
.
KeyValue
{
if
receipt
.
PriceExec
!=
defaultPriceExec
{
if
receipt
.
PriceExec
!=
""
&&
receipt
.
PriceExec
!=
defaultPriceExec
{
return
nil
return
nil
}
}
return
genSellMarketOrderKeyValue
(
kv
,
receipt
,
status
,
height
,
nil
)
return
genSellMarketOrderKeyValue
(
kv
,
receipt
,
status
,
height
,
nil
)
...
...
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