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
1e4e2ba6
Commit
1e4e2ba6
authored
Sep 04, 2019
by
liuyuhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modify test and .toml
parent
46e80d99
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
24 additions
and
6 deletions
+24
-6
chain33.para.toml
chain33.para.toml
+2
-0
chain33.cfg.toml
plugin/consensus/ticket/testdata/chain33.cfg.toml
+7
-0
chain33.cfg.toml
plugin/dapp/ticket/executor/testdata/chain33.cfg.toml
+7
-0
ticketdb.go
plugin/dapp/ticket/executor/ticketdb.go
+8
-6
No files found.
chain33.para.toml
View file @
1e4e2ba6
...
...
@@ -80,6 +80,7 @@ minerExecs=["paracross"] #配置挖矿合约
[mver.consensus]
fundKeyAddr
=
"1BQXS6TxaYYG5mADaWij4AxhZZUTpw95a5"
autonomyFundAddr
=
"1Ji3W12KGScCM7C2p8bg635sNkayDM8MGY"
coinReward
=
18
coinDevFund
=
12
ticketPrice
=
10000
...
...
@@ -211,6 +212,7 @@ ForkBase58AddressCheck=0
#平行链上使能平行链执行器如user.p.x.coins执行器的注册,缺省为0,对已有的平行链需要设置一个fork高度
ForkEnableParaRegExec
=
0
ForkCacheDriver
=
0
ForkTicketFundAddrV1
=
-1
#fork6.3
[fork.sub.coins]
Enable
=
0
...
...
plugin/consensus/ticket/testdata/chain33.cfg.toml
View file @
1e4e2ba6
...
...
@@ -70,9 +70,11 @@ name="ticket"
minerstart
=
true
genesisBlockTime
=
1514533394
genesis
=
"14KEKbYtKKQm4wMthSK9J4La4nAiidGozt"
minerExecs
=[
"ticket"
,
"autonomy"
]
[mver.consensus]
fundKeyAddr
=
"1BQXS6TxaYYG5mADaWij4AxhZZUTpw95a5"
autonomyFundAddr
=
"1Ji3W12KGScCM7C2p8bg635sNkayDM8MGY"
coinReward
=
18
coinDevFund
=
12
ticketPrice
=
10000
...
...
@@ -173,3 +175,7 @@ superManager=[
"12qyocayNF7Lv6C9qW4avxs2E7U41fKSfv"
,
"1Q8hGLfoGe63efeWa8fJ4Pnukhkngt6poK"
]
[exec.sub.autonomy]
total
=
"16htvcBNSEA7fZhAdLJphDwQRQJaHpyHTp"
useBalance
=
false
\ No newline at end of file
plugin/dapp/ticket/executor/testdata/chain33.cfg.toml
View file @
1e4e2ba6
...
...
@@ -70,9 +70,11 @@ name="ticket"
minerstart
=
true
genesisBlockTime
=
1514533394
genesis
=
"14KEKbYtKKQm4wMthSK9J4La4nAiidGozt"
minerExecs
=[
"ticket"
,
"autonomy"
]
[mver.consensus]
fundKeyAddr
=
"1BQXS6TxaYYG5mADaWij4AxhZZUTpw95a5"
autonomyFundAddr
=
"1Ji3W12KGScCM7C2p8bg635sNkayDM8MGY"
coinReward
=
18
coinDevFund
=
12
ticketPrice
=
10000
...
...
@@ -180,6 +182,10 @@ superManager=[
"1Q8hGLfoGe63efeWa8fJ4Pnukhkngt6poK"
]
[exec.sub.autonomy]
total
=
"16htvcBNSEA7fZhAdLJphDwQRQJaHpyHTp"
useBalance
=
false
#系统中所有的fork,默认用chain33的测试网络的
#但是我们可以替换
[fork.system]
...
...
@@ -204,6 +210,7 @@ ForkBlockCheck=-1 #fork 6.2
ForkBase58AddressCheck
=
-1
#fork6.2
ForkEnableParaRegExec
=
0
ForkCacheDriver
=
0
ForkTicketFundAddrV1
=
0
#fork6.3
[fork.sub.coins]
Enable
=
0
[fork.sub.ticket]
...
...
plugin/dapp/ticket/executor/ticketdb.go
View file @
1e4e2ba6
...
...
@@ -421,13 +421,15 @@ func (action *Action) TicketClose(tclose *ty.TicketClose) (*types.Receipt, error
kv
=
append
(
kv
,
receipt1
.
KV
...
)
//如果ticket 已经挖矿成功了,那么要解冻发展基金部分币
if
t
.
prevstatus
==
2
{
receipt2
,
err
:=
action
.
coinsAccount
.
ExecActive
(
types
.
GetFundAddr
(),
action
.
execaddr
,
cfg
.
CoinDevFund
)
if
err
!=
nil
{
tlog
.
Error
(
"TicketClose.ExecActive fund"
,
"addr"
,
types
.
GetFundAddr
(),
"execaddr"
,
action
.
execaddr
,
"value"
,
retValue
)
return
nil
,
err
if
!
types
.
IsFork
(
action
.
height
,
"ForkTicketFundAddrV1"
)
{
receipt2
,
err
:=
action
.
coinsAccount
.
ExecActive
(
types
.
GetFundAddr
(),
action
.
execaddr
,
cfg
.
CoinDevFund
)
if
err
!=
nil
{
tlog
.
Error
(
"TicketClose.ExecActive fund"
,
"addr"
,
types
.
GetFundAddr
(),
"execaddr"
,
action
.
execaddr
,
"value"
,
retValue
)
return
nil
,
err
}
logs
=
append
(
logs
,
receipt2
.
Logs
...
)
kv
=
append
(
kv
,
receipt2
.
KV
...
)
}
logs
=
append
(
logs
,
receipt2
.
Logs
...
)
kv
=
append
(
kv
,
receipt2
.
KV
...
)
}
t
.
Save
(
action
.
db
)
}
...
...
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