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
4ccc580a
Commit
4ccc580a
authored
Apr 29, 2019
by
mdj33
Committed by
vipwzw
May 05, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
modify super manager approve process
parent
d2f105a7
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
5 deletions
+9
-5
testcase.sh
plugin/dapp/paracross/cmd/build/testcase.sh
+2
-2
superaccount.go
plugin/dapp/paracross/executor/superaccount.go
+5
-3
errors.go
plugin/dapp/paracross/types/errors.go
+2
-0
No files found.
plugin/dapp/paracross/cmd/build/testcase.sh
View file @
4ccc580a
...
@@ -226,14 +226,14 @@ function para_configkey() {
...
@@ -226,14 +226,14 @@ function para_configkey() {
}
}
function
query_tx
()
{
function
query_tx
()
{
block_wait
"
${
1
}
"
2
block_wait
"
${
1
}
"
1
local times
=
100
local times
=
100
while
true
;
do
while
true
;
do
ret
=
$(${
1
}
tx query
-s
"
${
2
}
"
| jq
-r
".tx.hash"
)
ret
=
$(${
1
}
tx query
-s
"
${
2
}
"
| jq
-r
".tx.hash"
)
echo
"query hash is
${
2
}
, return
${
ret
}
"
echo
"query hash is
${
2
}
, return
${
ret
}
"
if
[
"
${
ret
}
"
!=
"
${
2
}
"
]
;
then
if
[
"
${
ret
}
"
!=
"
${
2
}
"
]
;
then
block_wait
"
${
1
}
"
2
block_wait
"
${
1
}
"
1
times
=
$((
times
-
1
))
times
=
$((
times
-
1
))
if
[
$times
-le
0
]
;
then
if
[
$times
-le
0
]
;
then
echo
"query tx=
$2
failed"
echo
"query tx=
$2
failed"
...
...
plugin/dapp/paracross/executor/superaccount.go
View file @
4ccc580a
...
@@ -341,10 +341,12 @@ func (a *action) nodeVote(config *pt.ParaNodeAddrConfig) (*types.Receipt, error)
...
@@ -341,10 +341,12 @@ func (a *action) nodeVote(config *pt.ParaNodeAddrConfig) (*types.Receipt, error)
return
nil
,
err
return
nil
,
err
}
}
consensHeight
:=
data
.
(
*
pt
.
ParacrossStatus
)
.
Height
consensHeight
:=
data
.
(
*
pt
.
ParacrossStatus
)
.
Height
if
a
.
exec
.
GetMainHeight
()
>
consensHeight
+
confStopBlocks
{
//return err to stop tx pass to para chain
clog
.
Info
(
"paracross.nodeVote, super manager pass"
,
"currHeight"
,
a
.
height
,
"consensHeight"
,
consensHeight
,
"confHeight"
,
confStopBlocks
)
if
a
.
exec
.
GetMainHeight
()
<=
consensHeight
+
confStopBlocks
{
superManagerPass
=
true
clog
.
Error
(
"paracross.nodeVote, super manager height not reach"
,
"currHeight"
,
a
.
exec
.
GetMainHeight
(),
"consensHeight"
,
consensHeight
,
"confHeight"
,
confStopBlocks
)
return
nil
,
pt
.
ErrParaConsensStopBlocksNotReach
}
}
superManagerPass
=
true
}
}
//超级用户投yes票,共识停止了一定高度就可以通过,防止当前所有授权节点都忘掉私钥场景
//超级用户投yes票,共识停止了一定高度就可以通过,防止当前所有授权节点都忘掉私钥场景
...
...
plugin/dapp/paracross/types/errors.go
View file @
4ccc580a
...
@@ -49,4 +49,6 @@ var (
...
@@ -49,4 +49,6 @@ var (
ErrParaNodeGroupStatusWrong
=
errors
.
New
(
"ErrParaNodeGroupStatusWrong"
)
ErrParaNodeGroupStatusWrong
=
errors
.
New
(
"ErrParaNodeGroupStatusWrong"
)
//ErrParaNodeGroupAddrNotMatch group addrs not match with apply
//ErrParaNodeGroupAddrNotMatch group addrs not match with apply
ErrParaNodeGroupAddrNotMatch
=
errors
.
New
(
"ErrParaNodeGroupAddrNotMatch"
)
ErrParaNodeGroupAddrNotMatch
=
errors
.
New
(
"ErrParaNodeGroupAddrNotMatch"
)
//ErrParaConsensStopBlocksNotReach consensus stop blocks not reach
ErrParaConsensStopBlocksNotReach
=
errors
.
New
(
"ErrParaConsensStopBlocksNotReach"
)
)
)
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