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
a71a8963
Commit
a71a8963
authored
Feb 13, 2019
by
linj
Committed by
vipwzw
Feb 21, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add fork for unfreeze id
parent
73c71b49
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
0 deletions
+8
-0
exec.go
plugin/dapp/unfreeze/executor/exec.go
+6
-0
const.go
plugin/dapp/unfreeze/types/const.go
+1
-0
types.go
plugin/dapp/unfreeze/types/types.go
+1
-0
No files found.
plugin/dapp/unfreeze/executor/exec.go
View file @
a71a8963
...
...
@@ -48,6 +48,9 @@ func (u *Unfreeze) Exec_Create(payload *pty.UnfreezeCreate, tx *types.Transactio
// Exec_Withdraw 执行冻结合约中提币
func
(
u
*
Unfreeze
)
Exec_Withdraw
(
payload
*
pty
.
UnfreezeWithdraw
,
tx
*
types
.
Transaction
,
index
int
)
(
*
types
.
Receipt
,
error
)
{
if
types
.
IsDappFork
(
u
.
GetHeight
(),
pty
.
UnfreezeX
,
pty
.
ForkUnfreezeIDX
)
{
payload
.
UnfreezeID
=
string
(
unfreezeID
([]
byte
(
payload
.
UnfreezeID
)))
}
unfreeze
,
err
:=
loadUnfreeze
(
payload
.
UnfreezeID
,
u
.
GetStateDB
())
if
err
!=
nil
{
return
nil
,
err
...
...
@@ -84,6 +87,9 @@ func (u *Unfreeze) Exec_Withdraw(payload *pty.UnfreezeWithdraw, tx *types.Transa
// Exec_Terminate 执行终止冻结合约
func
(
u
*
Unfreeze
)
Exec_Terminate
(
payload
*
pty
.
UnfreezeTerminate
,
tx
*
types
.
Transaction
,
index
int
)
(
*
types
.
Receipt
,
error
)
{
if
types
.
IsDappFork
(
u
.
GetHeight
(),
pty
.
UnfreezeX
,
pty
.
ForkUnfreezeIDX
)
{
payload
.
UnfreezeID
=
string
(
unfreezeID
([]
byte
(
payload
.
UnfreezeID
)))
}
unfreeze
,
err
:=
loadUnfreeze
(
payload
.
UnfreezeID
,
u
.
GetStateDB
())
if
err
!=
nil
{
return
nil
,
err
...
...
plugin/dapp/unfreeze/types/const.go
View file @
a71a8963
...
...
@@ -44,4 +44,5 @@ var (
SupportMeans
=
[]
string
{
"FixAmount"
,
"LeftProportion"
}
ForkTerminatePartX
=
"ForkTerminatePart"
ForkUnfreezeIDX
=
"ForkUnfreezeIDX"
)
plugin/dapp/unfreeze/types/types.go
View file @
a71a8963
...
...
@@ -26,6 +26,7 @@ func init() {
types
.
RegistorExecutor
(
name
,
NewType
())
types
.
RegisterDappFork
(
name
,
"Enable"
,
0
)
types
.
RegisterDappFork
(
name
,
ForkTerminatePartX
,
1298600
)
types
.
RegisterDappFork
(
name
,
ForkUnfreezeIDX
,
1450000
)
}
//getRealExecName
...
...
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