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
27b80e92
Commit
27b80e92
authored
Apr 26, 2019
by
mdj33
Committed by
vipwzw
May 05, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
adding node not check nodegroup status
parent
9cddd298
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
7 additions
and
7 deletions
+7
-7
superaccount.go
plugin/dapp/paracross/executor/superaccount.go
+7
-7
No files found.
plugin/dapp/paracross/executor/superaccount.go
View file @
27b80e92
...
...
@@ -191,20 +191,20 @@ func (a *action) nodeJoin(config *pt.ParaNodeAddrConfig) (*types.Receipt, error)
}
func
(
a
*
action
)
nodeQuit
(
config
*
pt
.
ParaNodeAddrConfig
)
(
*
types
.
Receipt
,
error
)
{
k
ey
:=
calcParaNodeAddrKey
(
config
.
Title
,
config
.
Addr
)
stat
,
err
:=
getNodeAddr
(
a
.
db
,
k
ey
)
addrK
ey
:=
calcParaNodeAddrKey
(
config
.
Title
,
config
.
Addr
)
stat
,
err
:=
getNodeAddr
(
a
.
db
,
addrK
ey
)
if
err
!=
nil
{
return
nil
,
err
}
if
stat
.
Status
==
pt
.
ParacrossNodeQuiting
||
stat
.
Status
==
pt
.
ParacrossNodeQuited
{
clog
.
Error
(
"nodeaccount.nodeQuit wrong status"
,
"key"
,
string
(
k
ey
),
"status"
,
stat
)
clog
.
Error
(
"nodeaccount.nodeQuit wrong status"
,
"key"
,
string
(
addrK
ey
),
"status"
,
stat
)
return
nil
,
errors
.
Wrapf
(
pt
.
ErrParaUnSupportNodeOper
,
"nodeAddr %s was quit status:%d"
,
a
.
fromaddr
,
stat
.
Status
)
}
if
stat
.
Status
==
pt
.
ParacrossNodeAdded
{
key
=
calcParaNodeGroupKey
(
config
.
Title
)
nodes
,
_
,
err
:=
getNodes
(
a
.
db
,
k
ey
)
groupKey
:
=
calcParaNodeGroupKey
(
config
.
Title
)
nodes
,
_
,
err
:=
getNodes
(
a
.
db
,
groupK
ey
)
if
err
!=
nil
{
return
nil
,
errors
.
Wrapf
(
err
,
"getNodes for title:%s"
,
config
.
Title
)
}
...
...
@@ -227,7 +227,7 @@ func (a *action) nodeQuit(config *pt.ParaNodeAddrConfig) (*types.Receipt, error)
if
stat
.
Status
==
pt
.
ParacrossNodeAdded
{
stat
.
Status
=
pt
.
ParacrossNodeQuiting
stat
.
Votes
=
&
pt
.
ParaNodeVoteDetail
{}
saveNodeAddr
(
a
.
db
,
k
ey
,
stat
)
saveNodeAddr
(
a
.
db
,
addrK
ey
,
stat
)
return
makeNodeConfigReceipt
(
a
.
fromaddr
,
config
,
&
copyStat
,
stat
),
nil
}
...
...
@@ -244,7 +244,7 @@ func (a *action) nodeQuit(config *pt.ParaNodeAddrConfig) (*types.Receipt, error)
stat
.
Status
=
pt
.
ParacrossNodeQuited
stat
.
Votes
=
&
pt
.
ParaNodeVoteDetail
{}
saveNodeAddr
(
a
.
db
,
k
ey
,
stat
)
saveNodeAddr
(
a
.
db
,
addrK
ey
,
stat
)
r
:=
makeNodeConfigReceipt
(
a
.
fromaddr
,
config
,
&
copyStat
,
stat
)
receipt
.
KV
=
append
(
receipt
.
KV
,
r
.
KV
...
)
receipt
.
Logs
=
append
(
receipt
.
Logs
,
r
.
Logs
...
)
...
...
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