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
3abcad7f
Commit
3abcad7f
authored
Jul 03, 2019
by
linj
Committed by
vipwzw
Jul 09, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add fork pt.ForkTradeFixAssetDBX: fix create asset account db
parent
a783b9a8
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
1 deletion
+9
-1
util.go
plugin/dapp/trade/executor/util.go
+6
-1
const.go
plugin/dapp/trade/types/const.go
+2
-0
trade.go
plugin/dapp/trade/types/trade.go
+1
-0
No files found.
plugin/dapp/trade/executor/util.go
View file @
3abcad7f
...
@@ -48,7 +48,12 @@ func checkAsset(height int64, exec, symbol string) bool {
...
@@ -48,7 +48,12 @@ func checkAsset(height int64, exec, symbol string) bool {
}
}
func
createAccountDB
(
height
int64
,
db
db
.
KV
,
exec
,
symbol
string
)
(
*
account
.
DB
,
error
)
{
func
createAccountDB
(
height
int64
,
db
db
.
KV
,
exec
,
symbol
string
)
(
*
account
.
DB
,
error
)
{
if
types
.
IsDappFork
(
height
,
pt
.
TradeX
,
pt
.
ForkTradeAssetX
)
{
if
types
.
IsDappFork
(
height
,
pt
.
TradeX
,
pt
.
ForkTradeFixAssetDBX
)
{
if
exec
==
""
{
exec
=
defaultAssetExec
}
return
account
.
NewAccountDB
(
exec
,
symbol
,
db
)
}
else
if
types
.
IsDappFork
(
height
,
pt
.
TradeX
,
pt
.
ForkTradeAssetX
)
{
return
account
.
NewAccountDB
(
exec
,
symbol
,
db
)
return
account
.
NewAccountDB
(
exec
,
symbol
,
db
)
}
}
...
...
plugin/dapp/trade/types/const.go
View file @
3abcad7f
...
@@ -90,4 +90,6 @@ const (
...
@@ -90,4 +90,6 @@ const (
ForkTradeBuyLimitX
=
"ForkTradeBuyLimit"
ForkTradeBuyLimitX
=
"ForkTradeBuyLimit"
// ForkTradeIDX id without prefix
// ForkTradeIDX id without prefix
ForkTradeIDX
=
"ForkTradeID"
ForkTradeIDX
=
"ForkTradeID"
// ForkTradeFixCreateAssetDBX fix bug: order create before ForkTradeAssetX, cannot trade after ForkTradeAssetX
ForkTradeFixAssetDBX
=
"ForkTradeFixAssetDB"
)
)
plugin/dapp/trade/types/trade.go
View file @
3abcad7f
...
@@ -55,6 +55,7 @@ func init() {
...
@@ -55,6 +55,7 @@ func init() {
types
.
RegisterDappFork
(
TradeX
,
ForkTradeBuyLimitX
,
301000
)
types
.
RegisterDappFork
(
TradeX
,
ForkTradeBuyLimitX
,
301000
)
types
.
RegisterDappFork
(
TradeX
,
ForkTradeAssetX
,
1010000
)
types
.
RegisterDappFork
(
TradeX
,
ForkTradeAssetX
,
1010000
)
types
.
RegisterDappFork
(
TradeX
,
ForkTradeIDX
,
1450000
)
types
.
RegisterDappFork
(
TradeX
,
ForkTradeIDX
,
1450000
)
types
.
RegisterDappFork
(
TradeX
,
ForkTradeFixAssetDBX
,
2500000
)
}
}
type
tradeType
struct
{
type
tradeType
struct
{
...
...
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