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
374d622a
Commit
374d622a
authored
Apr 26, 2019
by
vipwzw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
auto ci
parent
27b80e92
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
10 additions
and
12 deletions
+10
-12
testcase.sh
plugin/dapp/paracross/cmd/build/testcase.sh
+2
-3
superaccount.go
plugin/dapp/paracross/executor/superaccount.go
+8
-9
No files found.
plugin/dapp/paracross/cmd/build/testcase.sh
View file @
374d622a
...
...
@@ -446,7 +446,7 @@ function para_cross_transfer_withdraw_for_token() {
done
}
function
para_nodemanage_node_join
(){
function
para_nodemanage_node_join
()
{
echo
"================# para node manage test ================="
balance
=
$(${
CLI
}
account balance
-a
1E5saiXVb9mW8wcWUUZjsHJPZs5GmdzuSY
-e
paracross | jq
-r
".balance"
)
if
[
"
$balance
"
!=
"
$PARA_COIN_FROZEN
"
]
;
then
...
...
@@ -474,7 +474,7 @@ function para_nodemanage_node_join(){
}
function
para_nodemanage_quit_test
(){
function
para_nodemanage_quit_test
()
{
para_nodemanage_node_join
echo
"=========== # para chain node quit ============="
...
...
@@ -482,7 +482,6 @@ function para_nodemanage_quit_test(){
echo
"
${
hash
}
"
query_tx
"
${
PARA_CLI
}
"
"
${
hash
}
"
balance
=
$(${
CLI
}
account balance
-a
1E5saiXVb9mW8wcWUUZjsHJPZs5GmdzuSY
-e
paracross | jq
-r
".balance"
)
if
[
"
$balance
"
!=
"
$PARA_COIN_FROZEN
"
]
;
then
echo
"unfrozen coinfrozen error balance=
$balance
"
...
...
plugin/dapp/paracross/executor/superaccount.go
View file @
374d622a
...
...
@@ -202,13 +202,13 @@ func (a *action) nodeQuit(config *pt.ParaNodeAddrConfig) (*types.Receipt, error)
return
nil
,
errors
.
Wrapf
(
pt
.
ErrParaUnSupportNodeOper
,
"nodeAddr %s was quit status:%d"
,
a
.
fromaddr
,
stat
.
Status
)
}
if
stat
.
Status
==
pt
.
ParacrossNodeAdded
{
if
stat
.
Status
==
pt
.
ParacrossNodeAdded
{
groupKey
:=
calcParaNodeGroupKey
(
config
.
Title
)
nodes
,
_
,
err
:=
getNodes
(
a
.
db
,
groupKey
)
if
err
!=
nil
{
return
nil
,
errors
.
Wrapf
(
err
,
"getNodes for title:%s"
,
config
.
Title
)
}
if
!
validNode
(
a
.
fromaddr
,
nodes
){
if
!
validNode
(
a
.
fromaddr
,
nodes
)
{
return
nil
,
errors
.
Wrapf
(
pt
.
ErrParaNodeAddrNotExisted
,
"nodeAddr not existed:%s"
,
a
.
fromaddr
)
}
//不允许最后一个账户退出
...
...
@@ -217,7 +217,6 @@ func (a *action) nodeQuit(config *pt.ParaNodeAddrConfig) (*types.Receipt, error)
}
}
var
copyStat
pt
.
ParaNodeAddrStatus
err
=
deepCopy
(
&
copyStat
,
stat
)
if
err
!=
nil
{
...
...
@@ -334,16 +333,16 @@ func (a *action) nodeVote(config *pt.ParaNodeAddrConfig) (*types.Receipt, error)
most
,
vote
:=
getMostVote
(
stat
)
if
!
isCommitDone
(
stat
,
nodes
,
most
)
{
superManagerPass
:=
false
if
isSuperManager
(
a
.
fromaddr
){
if
isSuperManager
(
a
.
fromaddr
)
{
confStopBlocks
:=
conf
.
GInt
(
"paraConsensusStopBlocks"
)
data
,
err
:=
a
.
exec
.
paracrossGetHeight
(
config
.
Title
)
if
err
!=
nil
{
clog
.
Info
(
"paracross.nodeVote get consens height"
,
"err"
,
err
.
Error
())
data
,
err
:=
a
.
exec
.
paracrossGetHeight
(
config
.
Title
)
if
err
!=
nil
{
clog
.
Info
(
"paracross.nodeVote get consens height"
,
"err"
,
err
.
Error
())
return
nil
,
err
}
consensHeight
:=
data
.
(
*
pt
.
ParacrossStatus
)
.
Height
if
a
.
exec
.
GetMainHeight
()
>
consensHeight
+
confStopBlocks
{
clog
.
Info
(
"paracross.nodeVote, super manager pass"
,
"currHeight"
,
a
.
height
,
"consensHeight"
,
consensHeight
,
"confHeight"
,
confStopBlocks
)
if
a
.
exec
.
GetMainHeight
()
>
consensHeight
+
confStopBlocks
{
clog
.
Info
(
"paracross.nodeVote, super manager pass"
,
"currHeight"
,
a
.
height
,
"consensHeight"
,
consensHeight
,
"confHeight"
,
confStopBlocks
)
superManagerPass
=
true
}
}
...
...
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