Commit b76b46ac authored by mdj33's avatar mdj33 Committed by vipwzw

remove emptyinterval

parent e8e2734e
......@@ -38,7 +38,7 @@ func ParcCmd() *cobra.Command {
GetParaListCmd(),
GetNodeGroupCmd(),
GetNodeInfoCmd(),
GetNodeIdInfoCmd(),
GetNodeIDInfoCmd(),
GetNodeListCmd(),
NodeGroupStatusCmd(),
NodeGroupListCmd(),
......@@ -487,18 +487,18 @@ func nodeInfo(cmd *cobra.Command, args []string) {
ctx.Run()
}
// GetNodeInfoCmd get node current status
func GetNodeIdInfoCmd() *cobra.Command {
// GetNodeIDInfoCmd get node current status
func GetNodeIDInfoCmd() *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: nodeIdInfo,
Short: "Get node id current vote status:0:all,1:joining,2:quiting,3:closed,4:canceled",
Run: nodeIDInfo,
}
addNodeIdBodyCmdFlags(cmd)
addNodeIDBodyCmdFlags(cmd)
return cmd
}
func addNodeIdBodyCmdFlags(cmd *cobra.Command) {
func addNodeIDBodyCmdFlags(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 nodeIdInfo(cmd *cobra.Command, args []string) {
func nodeIDInfo(cmd *cobra.Command, args []string) {
rpcLaddr, _ := cmd.Flags().GetString("rpc_laddr")
title, _ := cmd.Flags().GetString("title")
id, _ := cmd.Flags().GetString("id")
......
......@@ -92,7 +92,7 @@ func (p *Paracross) Query_GetNodeAddrInfo(in *pt.ReqParacrossNodeInfo) (types.Me
return stat, nil
}
//Query_GetNodeIdInfo get specific node addr info
//Query_GetNodeIDInfo 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
......
......@@ -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)
......
......@@ -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 {
......
......@@ -217,7 +217,7 @@ func (c *Jrpc) GetNodeAddrStatus(req *pt.ReqParacrossNodeInfo, result *interface
return err
}
// GetNodeIdStatus get super node status
// GetNodeIDStatus get super node status
func (c *Jrpc) GetNodeIDStatus(req *pt.ReqParacrossNodeInfo, result *interface{}) error {
if req == nil || req.Id == "" {
return types.ErrInvalidParam
......
......@@ -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,
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment