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
58af0837
Commit
58af0837
authored
May 24, 2019
by
vipwzw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto ci
parent
513b605d
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
11 additions
and
11 deletions
+11
-11
superaccount.go
plugin/dapp/paracross/executor/superaccount.go
+11
-11
paracross.pb.go
plugin/dapp/paracross/types/paracross.pb.go
+0
-0
No files found.
plugin/dapp/paracross/executor/superaccount.go
View file @
58af0837
...
...
@@ -165,7 +165,7 @@ func (a *action) nodeJoin(config *pt.ParaNodeAddrConfig) (*types.Receipt, error)
receipt
:=
&
types
.
Receipt
{
Ty
:
types
.
ExecOk
}
if
!
types
.
IsPara
()
{
r
,
err
:=
a
.
nodeGroupCoinsFrozen
(
a
.
fromaddr
,
config
.
CoinsFrozen
,
1
)
r
,
err
:=
a
.
nodeGroupCoinsFrozen
(
a
.
fromaddr
,
config
.
CoinsFrozen
,
1
)
if
err
!=
nil
{
return
nil
,
err
}
...
...
@@ -258,7 +258,7 @@ func (a *action) nodeQuit(config *pt.ParaNodeAddrConfig) (*types.Receipt, error)
//still adding status, quit directly
receipt
:=
&
types
.
Receipt
{
Ty
:
types
.
ExecOk
}
if
!
types
.
IsPara
()
{
r
,
err
:=
a
.
nodeGroupCoinsActive
(
stat
.
FromAddr
,
stat
.
CoinsFrozen
,
1
)
r
,
err
:=
a
.
nodeGroupCoinsActive
(
stat
.
FromAddr
,
stat
.
CoinsFrozen
,
1
)
if
err
!=
nil
{
return
nil
,
err
}
...
...
@@ -438,7 +438,7 @@ func (a *action) nodeVote(config *pt.ParaNodeAddrConfig) (*types.Receipt, error)
stat
.
Status
=
pt
.
ParacrossNodeQuited
if
!
types
.
IsPara
()
{
r
,
err
:=
a
.
nodeGroupCoinsActive
(
stat
.
FromAddr
,
stat
.
CoinsFrozen
,
1
)
r
,
err
:=
a
.
nodeGroupCoinsActive
(
stat
.
FromAddr
,
stat
.
CoinsFrozen
,
1
)
if
err
!=
nil
{
return
nil
,
err
}
...
...
@@ -546,7 +546,7 @@ func (a *action) checkNodeGroupExist(title string) error {
return
nil
}
func
(
a
*
action
)
nodeGroupCoinsFrozen
(
createAddr
string
,
configCoinsFrozen
int64
,
nodeCounts
int64
)
(
*
types
.
Receipt
,
error
)
{
func
(
a
*
action
)
nodeGroupCoinsFrozen
(
createAddr
string
,
configCoinsFrozen
int64
,
nodeCounts
int64
)
(
*
types
.
Receipt
,
error
)
{
receipt
:=
&
types
.
Receipt
{}
confCoins
:=
conf
.
GInt
(
"nodeGroupFrozenCoins"
)
if
configCoinsFrozen
<
confCoins
{
...
...
@@ -585,7 +585,7 @@ func (a *action) nodeGroupCoinsActive(createAddr string, configCoinsFrozen int64
r
,
err
:=
a
.
coinsAccount
.
ExecActive
(
createAddr
,
realExecAddr
,
nodeCount
*
configCoinsFrozen
)
if
err
!=
nil
{
clog
.
Error
(
"node group apply"
,
"addr"
,
createAddr
,
"realExec"
,
realExec
,
"realAddr"
,
realExecAddr
,
"amount"
,
configCoinsFrozen
,
"nodeCount"
,
nodeCount
)
"realExec"
,
realExec
,
"realAddr"
,
realExecAddr
,
"amount"
,
configCoinsFrozen
,
"nodeCount"
,
nodeCount
)
return
nil
,
err
}
...
...
@@ -610,7 +610,7 @@ func (a *action) nodeGroupApply(config *pt.ParaNodeGroupConfig) (*types.Receipt,
receipt
:=
&
types
.
Receipt
{
Ty
:
types
.
ExecOk
}
//main chain
if
!
types
.
IsPara
()
{
r
,
err
:=
a
.
nodeGroupCoinsFrozen
(
a
.
fromaddr
,
config
.
CoinsFrozen
,
int64
(
len
(
addrs
)))
r
,
err
:=
a
.
nodeGroupCoinsFrozen
(
a
.
fromaddr
,
config
.
CoinsFrozen
,
int64
(
len
(
addrs
)))
if
err
!=
nil
{
return
nil
,
err
}
...
...
@@ -644,8 +644,8 @@ func (a *action) nodeGroupQuit(config *pt.ParaNodeGroupConfig) (*types.Receipt,
return
nil
,
pt
.
ErrParaNodeGroupStatusWrong
}
if
status
.
FromAddr
!=
a
.
fromaddr
{
clog
.
Error
(
"node group create addr err"
,
"createAddr"
,
status
.
FromAddr
,
"currAddr"
,
a
.
fromaddr
)
if
status
.
FromAddr
!=
a
.
fromaddr
{
clog
.
Error
(
"node group create addr err"
,
"createAddr"
,
status
.
FromAddr
,
"currAddr"
,
a
.
fromaddr
)
return
nil
,
types
.
ErrNotAllow
}
...
...
@@ -657,7 +657,7 @@ func (a *action) nodeGroupQuit(config *pt.ParaNodeGroupConfig) (*types.Receipt,
receipt
:=
&
types
.
Receipt
{
Ty
:
types
.
ExecOk
}
//main chain
if
!
types
.
IsPara
()
{
r
,
err
:=
a
.
nodeGroupCoinsActive
(
a
.
fromaddr
,
status
.
CoinsFrozen
,
int64
(
len
(
applyAddrs
)))
r
,
err
:=
a
.
nodeGroupCoinsActive
(
a
.
fromaddr
,
status
.
CoinsFrozen
,
int64
(
len
(
applyAddrs
)))
if
err
!=
nil
{
return
nil
,
err
}
...
...
@@ -734,7 +734,7 @@ func (a *action) nodeGroupApprove(config *pt.ParaNodeGroupConfig) (*types.Receip
receipt
:=
&
types
.
Receipt
{
Ty
:
types
.
ExecOk
}
//create the node group
r
,
err
:=
a
.
nodeGroupCreate
(
config
.
Title
,
applyAddrs
,
status
.
CoinsFrozen
,
status
.
FromAddr
)
r
,
err
:=
a
.
nodeGroupCreate
(
config
.
Title
,
applyAddrs
,
status
.
CoinsFrozen
,
status
.
FromAddr
)
if
err
!=
nil
{
return
nil
,
err
}
...
...
@@ -756,7 +756,7 @@ func (a *action) nodeGroupApprove(config *pt.ParaNodeGroupConfig) (*types.Receip
return
receipt
,
nil
}
func
(
a
*
action
)
nodeGroupCreate
(
title
string
,
nodes
[]
string
,
coinFrozen
int64
,
createAddr
string
)
(
*
types
.
Receipt
,
error
)
{
func
(
a
*
action
)
nodeGroupCreate
(
title
string
,
nodes
[]
string
,
coinFrozen
int64
,
createAddr
string
)
(
*
types
.
Receipt
,
error
)
{
var
item
types
.
ConfigItem
key
:=
calcParaNodeGroupKey
(
title
)
item
.
Key
=
string
(
key
)
...
...
plugin/dapp/paracross/types/paracross.pb.go
View file @
58af0837
This diff is collapsed.
Click to expand it.
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