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
b76b46ac
Commit
b76b46ac
authored
Jun 05, 2019
by
mdj33
Committed by
vipwzw
Jun 05, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
remove emptyinterval
parent
e8e2734e
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
12 additions
and
27 deletions
+12
-27
paracross.go
plugin/dapp/paracross/commands/paracross.go
+8
-8
query.go
plugin/dapp/paracross/executor/query.go
+1
-1
superaccount.go
plugin/dapp/paracross/executor/superaccount.go
+0
-7
paracross.proto
plugin/dapp/paracross/proto/paracross.proto
+2
-5
rpc.go
plugin/dapp/paracross/rpc/rpc.go
+1
-1
paracross.go
plugin/dapp/paracross/types/paracross.go
+0
-5
No files found.
plugin/dapp/paracross/commands/paracross.go
View file @
b76b46ac
...
...
@@ -38,7 +38,7 @@ func ParcCmd() *cobra.Command {
GetParaListCmd
(),
GetNodeGroupCmd
(),
GetNodeInfoCmd
(),
GetNodeI
d
InfoCmd
(),
GetNodeI
D
InfoCmd
(),
GetNodeListCmd
(),
NodeGroupStatusCmd
(),
NodeGroupListCmd
(),
...
...
@@ -487,18 +487,18 @@ func nodeInfo(cmd *cobra.Command, args []string) {
ctx
.
Run
()
}
// GetNodeInfoCmd get node current status
func
GetNodeI
d
InfoCmd
()
*
cobra
.
Command
{
// GetNodeI
DI
nfoCmd get node current status
func
GetNodeI
D
InfoCmd
()
*
cobra
.
Command
{
cmd
:=
&
cobra
.
Command
{
Use
:
"node_id_status"
,
Short
:
"Get node id current vote status:0:all,1:joining,2:quiting,3:closed,4:canceld"
,
Run
:
nodeI
d
Info
,
Short
:
"Get node id current vote status:0:all,1:joining,2:quiting,3:closed,4:cancel
e
d"
,
Run
:
nodeI
D
Info
,
}
addNodeI
d
BodyCmdFlags
(
cmd
)
addNodeI
D
BodyCmdFlags
(
cmd
)
return
cmd
}
func
addNodeI
d
BodyCmdFlags
(
cmd
*
cobra
.
Command
)
{
func
addNodeI
D
BodyCmdFlags
(
cmd
*
cobra
.
Command
)
{
cmd
.
Flags
()
.
StringP
(
"title"
,
"t"
,
""
,
"parallel chain's title"
)
cmd
.
MarkFlagRequired
(
"title"
)
...
...
@@ -507,7 +507,7 @@ func addNodeIdBodyCmdFlags(cmd *cobra.Command) {
}
func
nodeI
d
Info
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
func
nodeI
D
Info
(
cmd
*
cobra
.
Command
,
args
[]
string
)
{
rpcLaddr
,
_
:=
cmd
.
Flags
()
.
GetString
(
"rpc_laddr"
)
title
,
_
:=
cmd
.
Flags
()
.
GetString
(
"title"
)
id
,
_
:=
cmd
.
Flags
()
.
GetString
(
"id"
)
...
...
plugin/dapp/paracross/executor/query.go
View file @
b76b46ac
...
...
@@ -92,7 +92,7 @@ func (p *Paracross) Query_GetNodeAddrInfo(in *pt.ReqParacrossNodeInfo) (types.Me
return
stat
,
nil
}
//Query_GetNodeI
d
Info get specific node addr info
//Query_GetNodeI
D
Info get specific node addr info
func
(
p
*
Paracross
)
Query_GetNodeIDInfo
(
in
*
pt
.
ReqParacrossNodeInfo
)
(
types
.
Message
,
error
)
{
if
in
==
nil
||
in
.
Title
==
""
||
in
.
Id
==
""
{
return
nil
,
types
.
ErrInvalidParam
...
...
plugin/dapp/paracross/executor/superaccount.go
View file @
b76b46ac
...
...
@@ -776,8 +776,6 @@ func (a *action) nodeGroupApply(config *pt.ParaNodeGroupConfig) (*types.Receipt,
Title
:
config
.
Title
,
TargetAddrs
:
strings
.
Join
(
addrs
,
","
),
CoinsFrozen
:
config
.
CoinsFrozen
,
MainHeight
:
a
.
exec
.
GetMainHeight
(),
EmptyBlockInterval
:
config
.
EmptyBlockInterval
,
FromAddr
:
a
.
fromaddr
,
Height
:
a
.
height
}
r
:=
makeNodeGroupIDReceipt
(
a
.
fromaddr
,
nil
,
stat
)
...
...
@@ -794,8 +792,6 @@ func (a *action) nodeGroupModify(config *pt.ParaNodeGroupConfig) (*types.Receipt
Status
:
pt
.
ParacrossNodeGroupModify
,
Title
:
config
.
Title
,
CoinsFrozen
:
config
.
CoinsFrozen
,
MainHeight
:
a
.
exec
.
GetMainHeight
(),
EmptyBlockInterval
:
config
.
EmptyBlockInterval
,
Height
:
a
.
height
}
r
:=
makeNodeGroupIDReceipt
(
a
.
fromaddr
,
nil
,
stat
)
receipt
.
KV
=
append
(
receipt
.
KV
,
r
.
KV
...
)
...
...
@@ -868,8 +864,6 @@ func (a *action) nodeGroupApproveModify(config *pt.ParaNodeGroupConfig, modify *
copyStat
:=
*
stat
stat
.
Id
=
modify
.
Id
stat
.
CoinsFrozen
=
modify
.
CoinsFrozen
stat
.
EmptyBlockInterval
=
modify
.
EmptyBlockInterval
stat
.
MainHeight
=
a
.
exec
.
GetMainHeight
()
stat
.
Height
=
a
.
height
r
=
makeParaNodeGroupStatusReceipt
(
config
.
Title
,
a
.
fromaddr
,
&
copyStat
,
stat
)
...
...
@@ -901,7 +895,6 @@ func (a *action) nodeGroupApproveApply(config *pt.ParaNodeGroupConfig, apply *pt
copyStat
:=
*
apply
apply
.
Status
=
pt
.
ParacrossNodeGroupApprove
apply
.
MainHeight
=
a
.
exec
.
GetMainHeight
()
apply
.
Height
=
a
.
height
r
=
makeNodeGroupIDReceipt
(
a
.
fromaddr
,
&
copyStat
,
apply
)
...
...
plugin/dapp/paracross/proto/paracross.proto
View file @
b76b46ac
...
...
@@ -113,7 +113,6 @@ message ParaNodeGroupConfig {
string
id
=
3
;
string
addrs
=
4
;
int64
coinsFrozen
=
5
;
uint32
emptyBlockInterval
=
6
;
}
...
...
@@ -123,10 +122,8 @@ message ParaNodeGroupStatus {
string
title
=
3
;
string
targetAddrs
=
4
;
int64
coinsFrozen
=
5
;
uint32
emptyBlockInterval
=
6
;
int64
mainHeight
=
7
;
string
fromAddr
=
8
;
int64
height
=
9
;
string
fromAddr
=
6
;
int64
height
=
7
;
}
message
ReceiptParaNodeGroupConfig
{
...
...
plugin/dapp/paracross/rpc/rpc.go
View file @
b76b46ac
...
...
@@ -217,7 +217,7 @@ func (c *Jrpc) GetNodeAddrStatus(req *pt.ReqParacrossNodeInfo, result *interface
return
err
}
// GetNodeI
d
Status get super node status
// GetNodeI
D
Status get super node status
func
(
c
*
Jrpc
)
GetNodeIDStatus
(
req
*
pt
.
ReqParacrossNodeInfo
,
result
*
interface
{})
error
{
if
req
==
nil
||
req
.
Id
==
""
{
return
types
.
ErrInvalidParam
...
...
plugin/dapp/paracross/types/paracross.go
View file @
b76b46ac
...
...
@@ -214,12 +214,7 @@ func CreateRawNodeConfigTx(config *ParaNodeAddrConfig) (*types.Transaction, erro
//CreateRawNodeGroupApplyTx create raw tx for node group
func
CreateRawNodeGroupApplyTx
(
apply
*
ParaNodeGroupConfig
)
(
*
types
.
Transaction
,
error
)
{
apply
.
Title
=
types
.
GetTitle
()
apply
.
EmptyBlockInterval
=
4
apply
.
Id
=
strings
.
Trim
(
apply
.
Id
,
" "
)
interval
:=
types
.
Conf
(
"config.consensus.sub.para"
)
.
GInt
(
"emptyBlockInterval"
)
if
interval
>
0
{
apply
.
EmptyBlockInterval
=
uint32
(
interval
)
}
action
:=
&
ParacrossAction
{
Ty
:
ParacrossActionNodeGroupApply
,
...
...
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