Commit ce3d7e92 authored by liuyuhang's avatar liuyuhang Committed by 33cn

add proposal ID to message

parent 89b26ba9
...@@ -219,9 +219,9 @@ func addShowProposalBoardflags(cmd *cobra.Command) { ...@@ -219,9 +219,9 @@ func addShowProposalBoardflags(cmd *cobra.Command) {
cmd.Flags().StringP("proposalID", "p", "", "proposal ID") cmd.Flags().StringP("proposalID", "p", "", "proposal ID")
cmd.Flags().Uint32P("status", "s", 0, "status") cmd.Flags().Uint32P("status", "s", 0, "status")
cmd.Flags().Int32P("count", "c", 0, "count") cmd.Flags().Int32P("count", "c", 1, "count, default is 1")
cmd.Flags().Int32P("direction", "d", 0, "direction") cmd.Flags().Int32P("direction", "d", -1, "direction, default is reserve")
cmd.Flags().Int64P("index", "i", 0, "index") cmd.Flags().Int64P("index", "i", -1, "index, default is -1")
} }
func showProposalBoard(cmd *cobra.Command, args []string) { func showProposalBoard(cmd *cobra.Command, args []string) {
......
...@@ -239,9 +239,9 @@ func addShowProposalProjectflags(cmd *cobra.Command) { ...@@ -239,9 +239,9 @@ func addShowProposalProjectflags(cmd *cobra.Command) {
cmd.Flags().StringP("proposalID", "p", "", "proposal ID") cmd.Flags().StringP("proposalID", "p", "", "proposal ID")
cmd.Flags().Uint32P("status", "s", 0, "status") cmd.Flags().Uint32P("status", "s", 0, "status")
cmd.Flags().Int32P("count", "c", 0, "count") cmd.Flags().Int32P("count", "c", 1, "count, default is 1")
cmd.Flags().Int32P("direction", "d", 0, "direction") cmd.Flags().Int32P("direction", "d", -1, "direction, default is reserve")
cmd.Flags().Int64P("index", "i", 0, "index") cmd.Flags().Int64P("index", "i", -1, "index, default is -1")
} }
func showProposalProject(cmd *cobra.Command, args []string) { func showProposalProject(cmd *cobra.Command, args []string) {
......
...@@ -189,9 +189,9 @@ func addShowProposalRuleflags(cmd *cobra.Command) { ...@@ -189,9 +189,9 @@ func addShowProposalRuleflags(cmd *cobra.Command) {
cmd.Flags().StringP("proposalID", "p", "", "proposal ID") cmd.Flags().StringP("proposalID", "p", "", "proposal ID")
cmd.Flags().Uint32P("status", "s", 0, "status") cmd.Flags().Uint32P("status", "s", 0, "status")
cmd.Flags().Int32P("count", "c", 0, "count") cmd.Flags().Int32P("count", "c", 1, "count, default is 1")
cmd.Flags().Int32P("direction", "d", 0, "direction") cmd.Flags().Int32P("direction", "d", -1, "direction, default is reserve")
cmd.Flags().Int64P("index", "i", 0, "index") cmd.Flags().Int64P("index", "i", -1, "index, default is -1")
} }
func showProposalRule(cmd *cobra.Command, args []string) { func showProposalRule(cmd *cobra.Command, args []string) {
...@@ -308,9 +308,9 @@ func ShowProposalCommentCmd() *cobra.Command { ...@@ -308,9 +308,9 @@ func ShowProposalCommentCmd() *cobra.Command {
func addShowProposalCommentflags(cmd *cobra.Command) { func addShowProposalCommentflags(cmd *cobra.Command) {
cmd.Flags().StringP("proposalID", "p", "", "proposal ID") cmd.Flags().StringP("proposalID", "p", "", "proposal ID")
cmd.MarkFlagRequired("proposalID") cmd.MarkFlagRequired("proposalID")
cmd.Flags().Int32P("count", "c", 0, "count") cmd.Flags().Int32P("count", "c", 1, "count, default is 1")
cmd.Flags().Int32P("direction", "d", 0, "direction") cmd.Flags().Int32P("direction", "d", -1, "direction, default is reserve")
cmd.Flags().Int64P("index", "i", 0, "index") cmd.Flags().Int64P("index", "i", -1, "index, default is -1")
} }
func showProposalComment(cmd *cobra.Command, args []string) { func showProposalComment(cmd *cobra.Command, args []string) {
......
...@@ -95,6 +95,7 @@ func (a *action) propBoard(prob *auty.ProposalBoard) (*types.Receipt, error) { ...@@ -95,6 +95,7 @@ func (a *action) propBoard(prob *auty.ProposalBoard) (*types.Receipt, error) {
Address: a.fromaddr, Address: a.fromaddr,
Height: a.height, Height: a.height,
Index: a.index, Index: a.index,
ProposalID: common.ToHex(a.txhash),
} }
kv = append(kv, &types.KeyValue{Key: propBoardID(common.ToHex(a.txhash)), Value: types.Encode(cur)}) kv = append(kv, &types.KeyValue{Key: propBoardID(common.ToHex(a.txhash)), Value: types.Encode(cur)})
......
...@@ -72,6 +72,7 @@ func (a *action) propProject(prob *auty.ProposalProject) (*types.Receipt, error) ...@@ -72,6 +72,7 @@ func (a *action) propProject(prob *auty.ProposalProject) (*types.Receipt, error)
Address: a.fromaddr, Address: a.fromaddr,
Height: a.height, Height: a.height,
Index: a.index, Index: a.index,
ProposalID: common.ToHex(a.txhash),
} }
kv = append(kv, &types.KeyValue{Key: propProjectID(common.ToHex(a.txhash)), Value: types.Encode(cur)}) kv = append(kv, &types.KeyValue{Key: propProjectID(common.ToHex(a.txhash)), Value: types.Encode(cur)})
receiptLog := getProjectReceiptLog(nil, cur, auty.TyLogPropProject) receiptLog := getProjectReceiptLog(nil, cur, auty.TyLogPropProject)
......
...@@ -58,6 +58,7 @@ func (a *action) propRule(prob *auty.ProposalRule) (*types.Receipt, error) { ...@@ -58,6 +58,7 @@ func (a *action) propRule(prob *auty.ProposalRule) (*types.Receipt, error) {
Address: a.fromaddr, Address: a.fromaddr,
Height: a.height, Height: a.height,
Index: a.index, Index: a.index,
ProposalID: common.ToHex(a.txhash),
} }
key := propRuleID(common.ToHex(a.txhash)) key := propRuleID(common.ToHex(a.txhash))
......
...@@ -20,6 +20,7 @@ message AutonomyProposalBoard { ...@@ -20,6 +20,7 @@ message AutonomyProposalBoard {
string address = 5; string address = 5;
int64 height = 6; int64 height = 6;
int32 index = 7; int32 index = 7;
string proposalID = 8;
} }
// action // action
......
...@@ -23,6 +23,7 @@ message AutonomyProposalProject { ...@@ -23,6 +23,7 @@ message AutonomyProposalProject {
string address = 7; string address = 7;
int64 height = 8; int64 height = 8;
int32 index = 9; int32 index = 9;
string proposalID = 10;
} }
message ProposalProject { message ProposalProject {
......
...@@ -18,6 +18,7 @@ message AutonomyProposalRule { ...@@ -18,6 +18,7 @@ message AutonomyProposalRule {
string address = 5; string address = 5;
int64 height = 6; int64 height = 6;
int32 index = 7; int32 index = 7;
string proposalID = 8;
} }
message ProposalRule { message ProposalRule {
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
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