Commit 579ca570 authored by liuyuhang's avatar liuyuhang Committed by 33cn

add prob project

parent 0b56fd16
...@@ -66,7 +66,7 @@ func (a *action) propBoard(prob *auty.ProposalBoard) (*types.Receipt, error) { ...@@ -66,7 +66,7 @@ func (a *action) propBoard(prob *auty.ProposalBoard) (*types.Receipt, error) {
cur := &auty.AutonomyProposalBoard{ cur := &auty.AutonomyProposalBoard{
PropBoard:prob, PropBoard:prob,
Res: &auty.VotesResult{}, VoteResult: &auty.VoteResult{},
Status: auty.AutonomyStatusProposalBoard, Status: auty.AutonomyStatusProposalBoard,
Address: a.fromaddr, Address: a.fromaddr,
Height: a.height, Height: a.height,
...@@ -202,13 +202,13 @@ func (a *action) votePropBoard(voteProb *auty.VoteProposalBoard) (*types.Receipt ...@@ -202,13 +202,13 @@ func (a *action) votePropBoard(voteProb *auty.VoteProposalBoard) (*types.Receipt
// 加入已经投票的 // 加入已经投票的
votes.Address = append(votes.Address, a.fromaddr) votes.Address = append(votes.Address, a.fromaddr)
if cur.GetRes().TotalVotes == 0 { //需要统计票数 if cur.GetVoteResult().TotalVotes == 0 { //需要统计票数
addr := "16htvcBNSEA7fZhAdLJphDwQRQJaHpyHTp" addr := "16htvcBNSEA7fZhAdLJphDwQRQJaHpyHTp"
account, err := a.getStartHeightVoteAccount(addr, start) account, err := a.getStartHeightVoteAccount(addr, start)
if err != nil { if err != nil {
return nil, err return nil, err
} }
cur.Res.TotalVotes = int32(account.Balance/ticketPrice) cur.VoteResult.TotalVotes = int32(account.Balance/ticketPrice)
} }
account, err := a.getStartHeightVoteAccount(a.fromaddr, start) account, err := a.getStartHeightVoteAccount(a.fromaddr, start)
...@@ -216,17 +216,17 @@ func (a *action) votePropBoard(voteProb *auty.VoteProposalBoard) (*types.Receipt ...@@ -216,17 +216,17 @@ func (a *action) votePropBoard(voteProb *auty.VoteProposalBoard) (*types.Receipt
return nil, err return nil, err
} }
if voteProb.Approve { if voteProb.Approve {
cur.Res.ApproveVotes += int32(account.Balance/ticketPrice) cur.VoteResult.ApproveVotes += int32(account.Balance/ticketPrice)
} else { } else {
cur.Res.OpposeVotes += int32(account.Balance/ticketPrice) cur.VoteResult.OpposeVotes += int32(account.Balance/ticketPrice)
} }
var logs []*types.ReceiptLog var logs []*types.ReceiptLog
var kv []*types.KeyValue var kv []*types.KeyValue
if float32(cur.Res.ApproveVotes + cur.Res.OpposeVotes) / float32(cur.Res.TotalVotes) >= participationRate && if float32(cur.VoteResult.ApproveVotes + cur.VoteResult.OpposeVotes) / float32(cur.VoteResult.TotalVotes) >= participationRate &&
float32(cur.Res.ApproveVotes) / float32(cur.Res.ApproveVotes + cur.Res.OpposeVotes) >= approveRate { float32(cur.VoteResult.ApproveVotes) / float32(cur.VoteResult.ApproveVotes + cur.VoteResult.OpposeVotes) >= approveRate {
cur.Res.Pass = true cur.VoteResult.Pass = true
cur.PropBoard.RealEndBlockHeight = a.height cur.PropBoard.RealEndBlockHeight = a.height
receipt, err := a.coinsAccount.ExecTransferFrozen(cur.Address, autonomyAddr, a.execaddr, lockAmount) receipt, err := a.coinsAccount.ExecTransferFrozen(cur.Address, autonomyAddr, a.execaddr, lockAmount)
...@@ -240,7 +240,7 @@ func (a *action) votePropBoard(voteProb *auty.VoteProposalBoard) (*types.Receipt ...@@ -240,7 +240,7 @@ func (a *action) votePropBoard(voteProb *auty.VoteProposalBoard) (*types.Receipt
key := propBoardID(voteProb.ProposalID) key := propBoardID(voteProb.ProposalID)
cur.Status = auty.AutonomyStatusVotePropBoard cur.Status = auty.AutonomyStatusVotePropBoard
if cur.Res.Pass { if cur.VoteResult.Pass {
cur.Status = auty.AutonomyStatusTmintPropBoard cur.Status = auty.AutonomyStatusTmintPropBoard
} }
value = types.Encode(&cur) value = types.Encode(&cur)
...@@ -250,7 +250,7 @@ func (a *action) votePropBoard(voteProb *auty.VoteProposalBoard) (*types.Receipt ...@@ -250,7 +250,7 @@ func (a *action) votePropBoard(voteProb *auty.VoteProposalBoard) (*types.Receipt
kv = append(kv, &types.KeyValue{Key: VotesRecord(voteProb.ProposalID), Value: types.Encode(&votes)}) kv = append(kv, &types.KeyValue{Key: VotesRecord(voteProb.ProposalID), Value: types.Encode(&votes)})
ty := auty.TyLogVotePropBoard ty := auty.TyLogVotePropBoard
if cur.Res.Pass { if cur.VoteResult.Pass {
ty = auty.TyLogTmintPropBoard ty = auty.TyLogTmintPropBoard
} }
receiptLog := getReceiptLog(pre, &cur, int32(ty)) receiptLog := getReceiptLog(pre, &cur, int32(ty))
...@@ -293,20 +293,20 @@ func (a *action) tmintPropBoard(tmintProb *auty.TerminateProposalBoard) (*types. ...@@ -293,20 +293,20 @@ func (a *action) tmintPropBoard(tmintProb *auty.TerminateProposalBoard) (*types.
return nil, err return nil, err
} }
if cur.GetRes().TotalVotes == 0 { //需要统计票数 if cur.GetVoteResult().TotalVotes == 0 { //需要统计票数
addr := "16htvcBNSEA7fZhAdLJphDwQRQJaHpyHTp" addr := "16htvcBNSEA7fZhAdLJphDwQRQJaHpyHTp"
account, err := a.getStartHeightVoteAccount(addr, start) account, err := a.getStartHeightVoteAccount(addr, start)
if err != nil { if err != nil {
return nil, err return nil, err
} }
cur.Res.TotalVotes = int32(account.Balance/ticketPrice) cur.VoteResult.TotalVotes = int32(account.Balance/ticketPrice)
} }
if float32(cur.Res.ApproveVotes + cur.Res.OpposeVotes) / float32(cur.Res.TotalVotes) >= participationRate && if float32(cur.VoteResult.ApproveVotes + cur.VoteResult.OpposeVotes) / float32(cur.VoteResult.TotalVotes) >= participationRate &&
float32(cur.Res.ApproveVotes) / float32(cur.Res.ApproveVotes + cur.Res.OpposeVotes) >= approveRate { float32(cur.VoteResult.ApproveVotes) / float32(cur.VoteResult.ApproveVotes + cur.VoteResult.OpposeVotes) >= approveRate {
cur.Res.Pass = true cur.VoteResult.Pass = true
} else { } else {
cur.Res.Pass = false cur.VoteResult.Pass = false
} }
cur.PropBoard.RealEndBlockHeight = a.height cur.PropBoard.RealEndBlockHeight = a.height
...@@ -366,9 +366,9 @@ func getReceiptLog(pre, cur *auty.AutonomyProposalBoard, ty int32) *types.Receip ...@@ -366,9 +366,9 @@ func getReceiptLog(pre, cur *auty.AutonomyProposalBoard, ty int32) *types.Receip
func copyAutonomyProposalBoard(cur *auty.AutonomyProposalBoard) *auty.AutonomyProposalBoard { func copyAutonomyProposalBoard(cur *auty.AutonomyProposalBoard) *auty.AutonomyProposalBoard {
newAut := *cur newAut := *cur
newBoard := *cur.GetPropBoard() newBoard := *cur.GetPropBoard()
newRes := *cur.GetRes() newRes := *cur.GetVoteResult()
newAut.PropBoard = &newBoard newAut.PropBoard = &newBoard
newAut.Res = &newRes newAut.VoteResult = &newRes
return &newAut return &newAut
} }
...@@ -35,9 +35,6 @@ type execEnv struct { ...@@ -35,9 +35,6 @@ type execEnv struct {
} }
var ( var (
Symbol = "BTY"
Asset = "coins"
PrivKeyA = "0x6da92a632ab7deb67d38c0f6560bcfed28167998f6496db64c258d5e8393a81b" // 1KSBd17H7ZK8iT37aJztFB22XGwsPTdwE4 PrivKeyA = "0x6da92a632ab7deb67d38c0f6560bcfed28167998f6496db64c258d5e8393a81b" // 1KSBd17H7ZK8iT37aJztFB22XGwsPTdwE4
PrivKeyB = "0x19c069234f9d3e61135fefbeb7791b149cdf6af536f26bebb310d4cd22c3fee4" // 1JRNjdEqp4LJ5fqycUBm9ayCKSeeskgMKR PrivKeyB = "0x19c069234f9d3e61135fefbeb7791b149cdf6af536f26bebb310d4cd22c3fee4" // 1JRNjdEqp4LJ5fqycUBm9ayCKSeeskgMKR
PrivKeyC = "0x7a80a1f75d7360c6123c32a78ecf978c1ac55636f87892df38d8b85a9aeff115" // 1NLHPEcbTWWxxU3dGUZBhayjrCHD3psX7k PrivKeyC = "0x7a80a1f75d7360c6123c32a78ecf978c1ac55636f87892df38d8b85a9aeff115" // 1NLHPEcbTWWxxU3dGUZBhayjrCHD3psX7k
...@@ -47,18 +44,6 @@ var ( ...@@ -47,18 +44,6 @@ var (
AddrC = "1NLHPEcbTWWxxU3dGUZBhayjrCHD3psX7k" AddrC = "1NLHPEcbTWWxxU3dGUZBhayjrCHD3psX7k"
AddrD = "1MCftFynyvG2F4ED5mdHYgziDxx6vDrScs" AddrD = "1MCftFynyvG2F4ED5mdHYgziDxx6vDrScs"
AddrBWeight uint64 = 1
AddrCWeight uint64 = 4
AddrDWeight uint64 = 10
NewWeight uint64 = 2
Requiredweight uint64 = 5
NewRequiredweight uint64 = 4
CoinsBtyDailylimit uint64 = 100
NewCoinsBtyDailylimit uint64 = 10
PrintFlag = false
InAmount int64 = 10
OutAmount int64 = 5
boards = []string{"1KSBd17H7ZK8iT37aJztFB22XGwsPTdwE4", "1JRNjdEqp4LJ5fqycUBm9ayCKSeeskgMKR", "1NLHPEcbTWWxxU3dGUZBhayjrCHD3psX7k"} boards = []string{"1KSBd17H7ZK8iT37aJztFB22XGwsPTdwE4", "1JRNjdEqp4LJ5fqycUBm9ayCKSeeskgMKR", "1NLHPEcbTWWxxU3dGUZBhayjrCHD3psX7k"}
total = types.Coin * 30000 total = types.Coin * 30000
) )
...@@ -344,7 +329,7 @@ func voteProposalBoard(t *testing.T, env *execEnv, exec drivers.Driver, stateDB ...@@ -344,7 +329,7 @@ func voteProposalBoard(t *testing.T, env *execEnv, exec drivers.Driver, stateDB
require.NoError(t, err) require.NoError(t, err)
require.Equal(t, int32(auty.AutonomyStatusTmintPropBoard), cur.Status) require.Equal(t, int32(auty.AutonomyStatusTmintPropBoard), cur.Status)
require.Equal(t, AddrA, cur.Address) require.Equal(t, AddrA, cur.Address)
require.Equal(t, true, cur.Res.Pass) require.Equal(t, true, cur.VoteResult.Pass)
} }
func voteProposalBoardTx(parm *auty.VoteProposalBoard) (*types.Transaction, error) { func voteProposalBoardTx(parm *auty.VoteProposalBoard) (*types.Transaction, error) {
...@@ -452,13 +437,13 @@ func TestGetStartHeightVoteAccount(t *testing.T) { ...@@ -452,13 +437,13 @@ func TestGetStartHeightVoteAccount(t *testing.T) {
func TestGetReceiptLog(t *testing.T) { func TestGetReceiptLog(t *testing.T) {
pre := &auty.AutonomyProposalBoard{ pre := &auty.AutonomyProposalBoard{
PropBoard: &auty.ProposalBoard{Year: 1800, Month: 1}, PropBoard: &auty.ProposalBoard{Year: 1800, Month: 1},
Res: &auty.VotesResult{TotalVotes: 100}, VoteResult: &auty.VoteResult{TotalVotes: 100},
Status: 1, Status: 1,
Address:"121", Address:"121",
} }
cur := &auty.AutonomyProposalBoard{ cur := &auty.AutonomyProposalBoard{
PropBoard: &auty.ProposalBoard{Year: 1900, Month: 1}, PropBoard: &auty.ProposalBoard{Year: 1900, Month: 1},
Res: &auty.VotesResult{TotalVotes: 100}, VoteResult: &auty.VoteResult{TotalVotes: 100},
Status: 2, Status: 2,
Address:"123", Address:"123",
} }
...@@ -474,20 +459,20 @@ func TestGetReceiptLog(t *testing.T) { ...@@ -474,20 +459,20 @@ func TestGetReceiptLog(t *testing.T) {
func TestCopyAutonomyProposalBoard(t *testing.T) { func TestCopyAutonomyProposalBoard(t *testing.T) {
cur := &auty.AutonomyProposalBoard{ cur := &auty.AutonomyProposalBoard{
PropBoard: &auty.ProposalBoard{Year: 1900, Month: 1}, PropBoard: &auty.ProposalBoard{Year: 1900, Month: 1},
Res: &auty.VotesResult{TotalVotes: 100}, VoteResult: &auty.VoteResult{TotalVotes: 100},
Status: 2, Status: 2,
Address:"123", Address:"123",
} }
new := copyAutonomyProposalBoard(cur) new := copyAutonomyProposalBoard(cur)
cur.PropBoard.Year = 1800 cur.PropBoard.Year = 1800
cur.PropBoard.Month = 2 cur.PropBoard.Month = 2
cur.Res.TotalVotes = 50 cur.VoteResult.TotalVotes = 50
cur.Address = "234" cur.Address = "234"
cur.Status = 1 cur.Status = 1
require.Equal(t, 1900, int(new.PropBoard.Year)) require.Equal(t, 1900, int(new.PropBoard.Year))
require.Equal(t, 1, int(new.PropBoard.Month)) require.Equal(t, 1, int(new.PropBoard.Month))
require.Equal(t, 100, int(new.Res.TotalVotes)) require.Equal(t, 100, int(new.VoteResult.TotalVotes))
require.Equal(t, "123", new.Address) require.Equal(t, "123", new.Address)
require.Equal(t, 2, int(new.Status)) require.Equal(t, 2, int(new.Status))
} }
......
...@@ -9,6 +9,7 @@ import ( ...@@ -9,6 +9,7 @@ import (
auty "github.com/33cn/plugin/plugin/dapp/autonomy/types" auty "github.com/33cn/plugin/plugin/dapp/autonomy/types"
) )
// 提案董事会相关
// Exec_PropBoard 创建提案 // Exec_PropBoard 创建提案
func (a *Autonomy) Exec_PropBoard(payload *auty.ProposalBoard, tx *types.Transaction, index int) (*types.Receipt, error) { func (a *Autonomy) Exec_PropBoard(payload *auty.ProposalBoard, tx *types.Transaction, index int) (*types.Receipt, error) {
action := newAction(a, tx, int32(index)) action := newAction(a, tx, int32(index))
...@@ -31,4 +32,35 @@ func (a *Autonomy) Exec_VotePropBoard(payload *auty.VoteProposalBoard, tx *types ...@@ -31,4 +32,35 @@ func (a *Autonomy) Exec_VotePropBoard(payload *auty.VoteProposalBoard, tx *types
func (a *Autonomy) Exec_TmintPropBoard(payload *auty.TerminateProposalBoard, tx *types.Transaction, index int) (*types.Receipt, error) { func (a *Autonomy) Exec_TmintPropBoard(payload *auty.TerminateProposalBoard, tx *types.Transaction, index int) (*types.Receipt, error) {
action := newAction(a, tx, int32(index)) action := newAction(a, tx, int32(index))
return action.tmintPropBoard(payload) return action.tmintPropBoard(payload)
}
// 提案项目相关
// Exec_PropProject 创建提案项目
func (a *Autonomy) Exec_PropProject(payload *auty.ProposalProject, tx *types.Transaction, index int) (*types.Receipt, error) {
action := newAction(a, tx, int32(index))
return action.propProject(payload)
}
// Exec_RvkPropBoard 撤销提案项目
func (a *Autonomy) Exec_RvkPropProject(payload *auty.RevokeProposalProject, tx *types.Transaction, index int) (*types.Receipt, error) {
action := newAction(a, tx, int32(index))
return action.rvkPropProject(payload)
}
// Exec_VotePropBoard 投票提案项目
func (a *Autonomy) Exec_VotePropProject(payload *auty.VoteProposalProject, tx *types.Transaction, index int) (*types.Receipt, error) {
action := newAction(a, tx, int32(index))
return action.votePropProject(payload)
}
// Exec_VotePropBoard 投票提案项目
func (a *Autonomy) Exec_PubVotePropProject(payload *auty.PubVoteProposalProject, tx *types.Transaction, index int) (*types.Receipt, error) {
action := newAction(a, tx, int32(index))
return action.pubVotePropProject(payload)
}
// Exec_TmintPropBoard 终止提案项目
func (a *Autonomy) Exec_TmintPropProject(payload *auty.TerminateProposalProject, tx *types.Transaction, index int) (*types.Receipt, error) {
action := newAction(a, tx, int32(index))
return action.tmintPropProject(payload)
} }
\ No newline at end of file
...@@ -17,21 +17,40 @@ var ( ...@@ -17,21 +17,40 @@ var (
localPrefix = "LOCDB" + auty.AutonomyX + "-" localPrefix = "LOCDB" + auty.AutonomyX + "-"
) )
func VotesRecord(txHash string) []byte {
return []byte(fmt.Sprintf("%s%s", votesRecordPrefix, txHash))
}
var ( var (
// board // board
boardPrefix = idPrefix + "board" + "-" boardPrefix = idPrefix + "board" + "-"
localBoardPrefix = localPrefix + "board" + "-"
) )
func propBoardID(txHash string) []byte { func propBoardID(txHash string) []byte {
return []byte(fmt.Sprintf("%s%s", boardPrefix, txHash)) return []byte(fmt.Sprintf("%s%s", boardPrefix, txHash))
} }
func VotesRecord(txHash string) []byte { func calcBoardKey4StatusHeight(status int32, heightindex string) []byte {
return []byte(fmt.Sprintf("%s%s", votesRecordPrefix, txHash)) key := fmt.Sprintf(localBoardPrefix + "%d-" +"%s", status, heightindex)
return []byte(key)
} }
func calcBoardKey4StatusHeight(status int32, heightindex string) []byte { var (
key := fmt.Sprintf(localPrefix + "%d-" +"%s", status, heightindex) // project
projectPrefix = idPrefix + "project" + "-"
localProjectPrefix = localPrefix + "project" + "-"
)
func propProjectID(txHash string) []byte {
return []byte(fmt.Sprintf("%s%s", projectPrefix, txHash))
}
func calcProjectKey4StatusHeight(status int32, heightindex string) []byte {
key := fmt.Sprintf(localProjectPrefix + "%d-" +"%s", status, heightindex)
return []byte(key) return []byte(key)
} }
// Copyright Fuzamei Corp. 2018 All Rights Reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
package executor
import (
"github.com/33cn/chain33/common"
"github.com/33cn/chain33/types"
auty "github.com/33cn/plugin/plugin/dapp/autonomy/types"
"github.com/33cn/chain33/common/address"
)
const (
// 重大项目金额阈值
largeAmount = types.Coin * 100 *10000
)
func (a *action) propProject(prob *auty.ProposalProject) (*types.Receipt, error) {
if err := address.CheckAddress(prob.ToAddr); err != nil {
alog.Error("propProject ", "check toAddr error", err)
return nil, types.ErrInvalidParam
}
if prob.StartBlockHeight < a.height || prob.EndBlockHeight < a.height || prob.Amount <= 0 {
return nil, types.ErrInvalidParam
}
receipt, err := a.coinsAccount.ExecFrozen(a.fromaddr, a.execaddr, lockAmount)
if err != nil {
alog.Error("propProject ", "addr", a.fromaddr, "execaddr", a.execaddr, "ExecFrozen amount", lockAmount)
return nil, err
}
var logs []*types.ReceiptLog
var kv []*types.KeyValue
logs = append(logs, receipt.Logs...)
kv = append(kv, receipt.KV...)
var isPubVote bool
if prob.Amount >= largeAmount {
isPubVote = true
}
cur := &auty.AutonomyProposalProject{
PropProject:prob,
BoardVoteRes: &auty.VoteResult{},
PubVote: &auty.PublicVote{Publicity:isPubVote},
Status: auty.AutonomyStatusProposalProject,
Address: a.fromaddr,
Height: a.height,
Index: a.index,
}
key := propProjectID(common.ToHex(a.txhash))
value := types.Encode(cur)
kv = append(kv, &types.KeyValue{Key: key, Value: value})
receiptLog := getProjectReceiptLog(nil, cur, auty.TyLogPropProject)
logs = append(logs, receiptLog)
return &types.Receipt{Ty: types.ExecOk, KV: kv, Logs: logs}, nil
}
func (a *action) rvkPropProject(rvkProb *auty.RevokeProposalProject) (*types.Receipt, error) {
// 获取GameID
value, err := a.db.Get(propProjectID(rvkProb.ProposalID))
if err != nil {
alog.Error("rvkPropProject ", "addr", a.fromaddr, "execaddr", a.execaddr, "get ProposalProject) failed",
rvkProb.ProposalID, "err", err)
return nil, err
}
var cur auty.AutonomyProposalProject
err = types.Decode(value, &cur)
if err != nil {
alog.Error("rvkPropProject ", "addr", a.fromaddr, "execaddr", a.execaddr, "decode ProposalProject failed",
rvkProb.ProposalID, "err", err)
return nil, err
}
pre := copyAutonomyProposalProject(&cur)
// 检查当前状态
if cur.Status != auty.AutonomyStatusProposalProject {
err := auty.ErrProposalStatus
alog.Error("rvkPropProject ", "addr", a.fromaddr, "status", cur.Status, "status is not match",
rvkProb.ProposalID, "err", err)
return nil, err
}
start := cur.GetPropProject().StartBlockHeight
if a.height > start {
err := auty.ErrRevokeProposalPeriod
alog.Error("rvkPropProject ", "addr", a.fromaddr, "execaddr", a.execaddr, "ProposalID",
rvkProb.ProposalID, "err", err)
return nil, err
}
if a.fromaddr != cur.Address {
err := auty.ErrRevokeProposalPower
alog.Error("rvkPropProject ", "addr", a.fromaddr, "execaddr", a.execaddr, "ProposalID",
rvkProb.ProposalID, "err", err)
return nil, err
}
var logs []*types.ReceiptLog
var kv []*types.KeyValue
receipt, err := a.coinsAccount.ExecActive(a.fromaddr, a.execaddr, lockAmount)
if err != nil {
alog.Error("rvkPropProject ", "addr", a.fromaddr, "execaddr", a.execaddr, "ExecActive amount", lockAmount, "err", err)
return nil, err
}
logs = append(logs, receipt.Logs...)
kv = append(kv, receipt.KV...)
cur.Status = auty.AutonomyStatusRvkPropProject
kv = append(kv, &types.KeyValue{Key: propProjectID(rvkProb.ProposalID), Value: types.Encode(&cur)})
getProjectReceiptLog(pre, &cur, auty.TyLogRvkPropProject)
return &types.Receipt{Ty: types.ExecOk, KV: kv, Logs: logs}, nil
}
func (a *action) votePropProject(voteProb *auty.VoteProposalProject) (*types.Receipt, error) {
// 获取GameID
value, err := a.db.Get(propProjectID(voteProb.ProposalID))
if err != nil {
alog.Error("votePropProject ", "addr", a.fromaddr, "execaddr", a.execaddr, "get propProjectID failed",
voteProb.ProposalID, "err", err)
return nil, err
}
var cur auty.AutonomyProposalProject
err = types.Decode(value, &cur)
if err != nil {
alog.Error("votePropProject ", "addr", a.fromaddr, "execaddr", a.execaddr, "decode AutonomyProposalProject failed",
voteProb.ProposalID, "err", err)
return nil, err
}
pre := copyAutonomyProposalProject(&cur)
start := cur.GetPropProject().StartBlockHeight
end := cur.GetPropProject().EndBlockHeight
real := cur.GetPropProject().RealEndBlockHeight
if start < a.height || end < a.height || (real != 0 && real < a.height) {
err := auty.ErrVotePeriod
alog.Error("votePropProject ", "addr", a.fromaddr, "execaddr", a.execaddr, "ProposalID",
voteProb.ProposalID, "err", err)
return nil, err
}
// 检查当前状态
if cur.Status != auty.AutonomyStatusProposalProject && cur.Status != auty.AutonomyStatusVotePropProject {
err := auty.ErrProposalStatus
alog.Error("votePropProject ", "addr", a.fromaddr, "status", cur.Status, "ProposalID",
voteProb.ProposalID, "err", err)
return nil, err
}
// 检查是否已经参与投票
var votes auty.VotesRecord
value, err = a.db.Get(VotesRecord(voteProb.ProposalID))
if err == nil {
err = types.Decode(value, &votes)
if err != nil {
alog.Error("votePropProject ", "addr", a.fromaddr, "execaddr", a.execaddr, "decode VotesRecord failed",
voteProb.ProposalID, "err", err)
return nil, err
}
}
// 检查是否有重复
for _, addr := range votes.Address {
if addr == a.fromaddr {
err := auty.ErrRepeatVoteAddr
alog.Error("votePropProject ", "addr", a.fromaddr, "execaddr", a.execaddr, "repeat address GameID",
voteProb.ProposalID, "err", err)
return nil, err
}
}
// 加入已经投票的
votes.Address = append(votes.Address, a.fromaddr)
if cur.GetBoardVoteRes().TotalVotes == 0 { //需要统计票数
addr := "16htvcBNSEA7fZhAdLJphDwQRQJaHpyHTp"
account, err := a.getStartHeightVoteAccount(addr, start)
if err != nil {
return nil, err
}
cur.BoardVoteRes.TotalVotes = int32(account.Balance/ticketPrice)
}
account, err := a.getStartHeightVoteAccount(a.fromaddr, start)
if err != nil {
return nil, err
}
if voteProb.Approve {
cur.BoardVoteRes.ApproveVotes += int32(account.Balance/ticketPrice)
} else {
cur.BoardVoteRes.OpposeVotes += int32(account.Balance/ticketPrice)
}
var logs []*types.ReceiptLog
var kv []*types.KeyValue
if float32(cur.BoardVoteRes.ApproveVotes + cur.BoardVoteRes.OpposeVotes) / float32(cur.BoardVoteRes.TotalVotes) >= participationRate &&
float32(cur.BoardVoteRes.ApproveVotes) / float32(cur.BoardVoteRes.ApproveVotes + cur.BoardVoteRes.OpposeVotes) >= approveRate {
cur.BoardVoteRes.Pass = true
cur.PropProject.RealEndBlockHeight = a.height
receipt, err := a.coinsAccount.ExecTransferFrozen(cur.Address, autonomyAddr, a.execaddr, lockAmount)
if err != nil {
alog.Error("votePropProject ", "addr", cur.Address, "execaddr", a.execaddr, "ExecTransferFrozen amount fail", err)
return nil, err
}
logs = append(logs, receipt.Logs...)
kv = append(kv, receipt.KV...)
}
key := propProjectID(voteProb.ProposalID)
cur.Status = auty.AutonomyStatusVotePropProject
if cur.BoardVoteRes.Pass {
cur.Status = auty.AutonomyStatusTmintPropProject
}
value = types.Encode(&cur)
kv = append(kv, &types.KeyValue{Key: key, Value: value})
// 更新VotesRecord
kv = append(kv, &types.KeyValue{Key: VotesRecord(voteProb.ProposalID), Value: types.Encode(&votes)})
ty := auty.TyLogVotePropProject
if cur.BoardVoteRes.Pass {
ty = auty.TyLogTmintPropProject
}
receiptLog := getProjectReceiptLog(pre, &cur, int32(ty))
logs = append(logs, receiptLog)
return &types.Receipt{Ty: types.ExecOk, KV: kv, Logs: logs}, nil
}
func (a *action) pubVotePropProject(voteProb *auty.PubVoteProposalProject) (*types.Receipt, error) {
return nil, nil
}
func (a *action) tmintPropProject(tmintProb *auty.TerminateProposalProject) (*types.Receipt, error) {
// 获取GameID
value, err := a.db.Get(propProjectID(tmintProb.ProposalID))
if err != nil {
alog.Error("tmintPropProject ", "addr", a.fromaddr, "execaddr", a.execaddr, "get propProjectID failed",
tmintProb.ProposalID, "err", err)
return nil, err
}
var cur auty.AutonomyProposalProject
err = types.Decode(value, &cur)
if err != nil {
alog.Error("tmintPropProject ", "addr", a.fromaddr, "execaddr", a.execaddr, "decode AutonomyProposalProject failed",
tmintProb.ProposalID, "err", err)
return nil, err
}
pre := copyAutonomyProposalProject(&cur)
start := cur.GetPropProject().StartBlockHeight
end := cur.GetPropProject().EndBlockHeight
if a.height < end && cur.Status != auty.AutonomyStatusVotePropProject {
err := auty.ErrTerminatePeriod
alog.Error("tmintPropProject ", "addr", a.fromaddr, "status", cur.Status, "height", a.height, "ProposalID",
tmintProb.ProposalID, "err", err)
return nil, err
}
// 检查当前状态
if cur.Status == auty.AutonomyStatusTmintPropProject {
err := auty.ErrProposalStatus
alog.Error("tmintPropProject ", "addr", a.fromaddr, "status", cur.Status, "status is not match",
tmintProb.ProposalID, "err", err)
return nil, err
}
if cur.GetBoardVoteRes().TotalVotes == 0 { //需要统计票数
addr := "16htvcBNSEA7fZhAdLJphDwQRQJaHpyHTp"
account, err := a.getStartHeightVoteAccount(addr, start)
if err != nil {
return nil, err
}
cur.BoardVoteRes.TotalVotes = int32(account.Balance/ticketPrice)
}
if float32(cur.BoardVoteRes.ApproveVotes + cur.BoardVoteRes.OpposeVotes) / float32(cur.BoardVoteRes.TotalVotes) >= participationRate &&
float32(cur.BoardVoteRes.ApproveVotes) / float32(cur.BoardVoteRes.ApproveVotes + cur.BoardVoteRes.OpposeVotes) >= approveRate {
cur.BoardVoteRes.Pass = true
} else {
cur.BoardVoteRes.Pass = false
}
cur.PropProject.RealEndBlockHeight = a.height
var logs []*types.ReceiptLog
var kv []*types.KeyValue
receipt, err := a.coinsAccount.ExecTransferFrozen(cur.Address, autonomyAddr, a.execaddr, lockAmount)
if err != nil {
alog.Error("votePropProject ", "addr", a.fromaddr, "execaddr", a.execaddr, "ExecTransferFrozen amount fail", err)
return nil, err
}
logs = append(logs, receipt.Logs...)
kv = append(kv, receipt.KV...)
cur.Status = auty.AutonomyStatusTmintPropProject
kv = append(kv, &types.KeyValue{Key: propProjectID(tmintProb.ProposalID), Value: types.Encode(&cur)})
getProjectReceiptLog(pre, &cur, auty.TyLogTmintPropProject)
return &types.Receipt{Ty: types.ExecOk, KV: kv, Logs: logs}, nil
}
// getProjectReceiptLog 根据提案信息获取log
// 状态变化:
func getProjectReceiptLog(pre, cur *auty.AutonomyProposalProject, ty int32) *types.ReceiptLog {
log := &types.ReceiptLog{}
log.Ty = ty
r := &auty.ReceiptProposalProject{Prev: pre, Current: cur}
log.Log = types.Encode(r)
return log
}
func copyAutonomyProposalProject(cur *auty.AutonomyProposalProject) *auty.AutonomyProposalProject {
newAut := *cur
newProject := *cur.GetPropProject()
newRes := *cur.GetBoardVoteRes()
newPub := *cur.GetPubVote()
newAut.PropProject = &newProject
newAut.BoardVoteRes = &newRes
newAut.PubVote = &newPub
return &newAut
}
...@@ -20,15 +20,16 @@ message AutonomyAction { ...@@ -20,15 +20,16 @@ message AutonomyAction {
VoteProposalBoard votePropBoard = 3; VoteProposalBoard votePropBoard = 3;
TerminateProposalBoard tmintPropBoard = 4; TerminateProposalBoard tmintPropBoard = 4;
// 提案项目相关 // 提案项目相关
ProposalProject propProject = 5; ProposalProject propProject = 5;
RevokeProposalProject rvkPropProject = 6; RevokeProposalProject rvkPropProject = 6;
VoteProposalBoard votePropProject = 7; VoteProposalProject votePropProject = 7;
TerminateProposalProject tmintPropProject = 8; PubVoteProposalProject pubVotePropProject = 8;
TerminateProposalProject tmintPropProject = 9;
// 提案规则修改相关 // 提案规则修改相关
ProposalRule propRule = 9; ProposalRule propRule = 10;
RevokeProposalRule rvkPropRule = 10; RevokeProposalRule rvkPropRule = 11;
VoteProposalBoard votePropRule = 11; VoteProposalRule votePropRule = 12;
TerminateProposalRule tmintPropRule = 12; TerminateProposalRule tmintPropRule = 13;
} }
int32 ty = 13; int32 ty = 14;
} }
\ No newline at end of file
...@@ -10,14 +10,14 @@ package types; ...@@ -10,14 +10,14 @@ package types;
message AutonomyProposalBoard { message AutonomyProposalBoard {
ProposalBoard propBoard = 1; ProposalBoard propBoard = 1;
// 全体持票人投票结果 // 全体持票人投票结果
VotesResult res = 2; VoteResult voteResult = 2;
// 状态 // 状态
int32 status = 3; int32 status = 3;
string address = 4; string address = 4;
int64 height = 5; int64 height = 5;
int32 index = 6; int32 index = 6;
} }
// action // action
......
...@@ -6,7 +6,7 @@ syntax = "proto3"; ...@@ -6,7 +6,7 @@ syntax = "proto3";
package types; package types;
message VotesResult { message VoteResult {
// 总票数 // 总票数
int32 totalVotes = 1; int32 totalVotes = 1;
// 赞成票 // 赞成票
...@@ -17,6 +17,15 @@ message VotesResult { ...@@ -17,6 +17,15 @@ message VotesResult {
bool pass = 4; bool pass = 4;
} }
message PublicVote {
// 是否需要公示
bool publicity = 1;
// 全体持票人反对票
int32 opposeVotes = 2;
// 是否通过
bool pubPass = 3;
}
message VotesRecord { message VotesRecord {
repeated string address = 1; repeated string address = 1;
} }
\ No newline at end of file
...@@ -9,17 +9,16 @@ import "lcommon.proto"; ...@@ -9,17 +9,16 @@ import "lcommon.proto";
package types; package types;
message AutonomyProposalProject { message AutonomyProposalProject {
ProposalProject propProject = 1; ProposalProject propProject = 1;
// 董事会投票结果 // 董事会投票结果
VotesResult boardResult = 2; VoteResult boardVoteRes = 2;
// 是否需要公示 // 公示投票
bool publicity = 3; PublicVote pubVote = 3;
// 全体持票人反对票
int32 opposeVotes = 4;
// 是否通过
bool pubPass = 5;
// 状态 // 状态
int32 status = 6; int32 status = 4;
string address = 5;
int64 height = 6;
int32 index = 7;
} }
message ProposalProject { message ProposalProject {
...@@ -34,7 +33,7 @@ message ProposalProject { ...@@ -34,7 +33,7 @@ message ProposalProject {
string production = 6; // 项目地址 string production = 6; // 项目地址
string description = 7; // 项目阶段性简述 string description = 7; // 项目阶段性简述
string contractor = 8; // 承包人 string contractor = 8; // 承包人
int32 amount = 9; // 项目经费 int64 amount = 9; // 项目经费
string amountDetail = 10; // 经费细则 string amountDetail = 10; // 经费细则
// 支付相关 // 支付相关
...@@ -51,6 +50,16 @@ message RevokeProposalProject { ...@@ -51,6 +50,16 @@ message RevokeProposalProject {
string proposalID = 1; string proposalID = 1;
} }
message VoteProposalProject {
string proposalID = 1;
bool approve = 2;
}
message PubVoteProposalProject {
string proposalID = 1;
bool oppose = 2;
}
message TerminateProposalProject { message TerminateProposalProject {
string proposalID = 1; string proposalID = 1;
} }
......
...@@ -11,7 +11,7 @@ package types; ...@@ -11,7 +11,7 @@ package types;
message AutonomyProposalRule { message AutonomyProposalRule {
ProposalRule propRule = 1; ProposalRule propRule = 1;
// 全体持票人投票结果 // 全体持票人投票结果
VotesResult res = 2; VoteResult res = 2;
// 状态 // 状态
int32 status = 3; int32 status = 3;
} }
...@@ -39,6 +39,11 @@ message RevokeProposalRule { ...@@ -39,6 +39,11 @@ message RevokeProposalRule {
string proposalID = 1; string proposalID = 1;
} }
message VoteProposalRule {
string proposalID = 1;
bool approve = 2;
}
message TerminateProposalRule { message TerminateProposalRule {
string proposalID = 1; string proposalID = 1;
} }
......
...@@ -22,11 +22,14 @@ It has these top-level messages: ...@@ -22,11 +22,14 @@ It has these top-level messages:
LocalProposalBoard LocalProposalBoard
ReqQueryProposalBoard ReqQueryProposalBoard
ReplyQueryProposalBoard ReplyQueryProposalBoard
VotesResult VoteResult
PublicVote
VotesRecord VotesRecord
AutonomyProposalProject AutonomyProposalProject
ProposalProject ProposalProject
RevokeProposalProject RevokeProposalProject
VoteProposalProject
PubVoteProposalProject
TerminateProposalProject TerminateProposalProject
ReceiptProposalProject ReceiptProposalProject
LocalProposalProject LocalProposalProject
...@@ -35,6 +38,7 @@ It has these top-level messages: ...@@ -35,6 +38,7 @@ It has these top-level messages:
AutonomyProposalRule AutonomyProposalRule
ProposalRule ProposalRule
RevokeProposalRule RevokeProposalRule
VoteProposalRule
TerminateProposalRule TerminateProposalRule
ReceiptProposalRule ReceiptProposalRule
LocalProposalRule LocalProposalRule
...@@ -68,13 +72,14 @@ type AutonomyAction struct { ...@@ -68,13 +72,14 @@ type AutonomyAction struct {
// *AutonomyAction_PropProject // *AutonomyAction_PropProject
// *AutonomyAction_RvkPropProject // *AutonomyAction_RvkPropProject
// *AutonomyAction_VotePropProject // *AutonomyAction_VotePropProject
// *AutonomyAction_PubVotePropProject
// *AutonomyAction_TmintPropProject // *AutonomyAction_TmintPropProject
// *AutonomyAction_PropRule // *AutonomyAction_PropRule
// *AutonomyAction_RvkPropRule // *AutonomyAction_RvkPropRule
// *AutonomyAction_VotePropRule // *AutonomyAction_VotePropRule
// *AutonomyAction_TmintPropRule // *AutonomyAction_TmintPropRule
Value isAutonomyAction_Value `protobuf_oneof:"value"` Value isAutonomyAction_Value `protobuf_oneof:"value"`
Ty int32 `protobuf:"varint,13,opt,name=ty" json:"ty,omitempty"` Ty int32 `protobuf:"varint,14,opt,name=ty" json:"ty,omitempty"`
} }
func (m *AutonomyAction) Reset() { *m = AutonomyAction{} } func (m *AutonomyAction) Reset() { *m = AutonomyAction{} }
...@@ -105,36 +110,40 @@ type AutonomyAction_RvkPropProject struct { ...@@ -105,36 +110,40 @@ type AutonomyAction_RvkPropProject struct {
RvkPropProject *RevokeProposalProject `protobuf:"bytes,6,opt,name=rvkPropProject,oneof"` RvkPropProject *RevokeProposalProject `protobuf:"bytes,6,opt,name=rvkPropProject,oneof"`
} }
type AutonomyAction_VotePropProject struct { type AutonomyAction_VotePropProject struct {
VotePropProject *VoteProposalBoard `protobuf:"bytes,7,opt,name=votePropProject,oneof"` VotePropProject *VoteProposalProject `protobuf:"bytes,7,opt,name=votePropProject,oneof"`
}
type AutonomyAction_PubVotePropProject struct {
PubVotePropProject *PubVoteProposalProject `protobuf:"bytes,8,opt,name=pubVotePropProject,oneof"`
} }
type AutonomyAction_TmintPropProject struct { type AutonomyAction_TmintPropProject struct {
TmintPropProject *TerminateProposalProject `protobuf:"bytes,8,opt,name=tmintPropProject,oneof"` TmintPropProject *TerminateProposalProject `protobuf:"bytes,9,opt,name=tmintPropProject,oneof"`
} }
type AutonomyAction_PropRule struct { type AutonomyAction_PropRule struct {
PropRule *ProposalRule `protobuf:"bytes,9,opt,name=propRule,oneof"` PropRule *ProposalRule `protobuf:"bytes,10,opt,name=propRule,oneof"`
} }
type AutonomyAction_RvkPropRule struct { type AutonomyAction_RvkPropRule struct {
RvkPropRule *RevokeProposalRule `protobuf:"bytes,10,opt,name=rvkPropRule,oneof"` RvkPropRule *RevokeProposalRule `protobuf:"bytes,11,opt,name=rvkPropRule,oneof"`
} }
type AutonomyAction_VotePropRule struct { type AutonomyAction_VotePropRule struct {
VotePropRule *VoteProposalBoard `protobuf:"bytes,11,opt,name=votePropRule,oneof"` VotePropRule *VoteProposalRule `protobuf:"bytes,12,opt,name=votePropRule,oneof"`
} }
type AutonomyAction_TmintPropRule struct { type AutonomyAction_TmintPropRule struct {
TmintPropRule *TerminateProposalRule `protobuf:"bytes,12,opt,name=tmintPropRule,oneof"` TmintPropRule *TerminateProposalRule `protobuf:"bytes,13,opt,name=tmintPropRule,oneof"`
} }
func (*AutonomyAction_PropBoard) isAutonomyAction_Value() {} func (*AutonomyAction_PropBoard) isAutonomyAction_Value() {}
func (*AutonomyAction_RvkPropBoard) isAutonomyAction_Value() {} func (*AutonomyAction_RvkPropBoard) isAutonomyAction_Value() {}
func (*AutonomyAction_VotePropBoard) isAutonomyAction_Value() {} func (*AutonomyAction_VotePropBoard) isAutonomyAction_Value() {}
func (*AutonomyAction_TmintPropBoard) isAutonomyAction_Value() {} func (*AutonomyAction_TmintPropBoard) isAutonomyAction_Value() {}
func (*AutonomyAction_PropProject) isAutonomyAction_Value() {} func (*AutonomyAction_PropProject) isAutonomyAction_Value() {}
func (*AutonomyAction_RvkPropProject) isAutonomyAction_Value() {} func (*AutonomyAction_RvkPropProject) isAutonomyAction_Value() {}
func (*AutonomyAction_VotePropProject) isAutonomyAction_Value() {} func (*AutonomyAction_VotePropProject) isAutonomyAction_Value() {}
func (*AutonomyAction_TmintPropProject) isAutonomyAction_Value() {} func (*AutonomyAction_PubVotePropProject) isAutonomyAction_Value() {}
func (*AutonomyAction_PropRule) isAutonomyAction_Value() {} func (*AutonomyAction_TmintPropProject) isAutonomyAction_Value() {}
func (*AutonomyAction_RvkPropRule) isAutonomyAction_Value() {} func (*AutonomyAction_PropRule) isAutonomyAction_Value() {}
func (*AutonomyAction_VotePropRule) isAutonomyAction_Value() {} func (*AutonomyAction_RvkPropRule) isAutonomyAction_Value() {}
func (*AutonomyAction_TmintPropRule) isAutonomyAction_Value() {} func (*AutonomyAction_VotePropRule) isAutonomyAction_Value() {}
func (*AutonomyAction_TmintPropRule) isAutonomyAction_Value() {}
func (m *AutonomyAction) GetValue() isAutonomyAction_Value { func (m *AutonomyAction) GetValue() isAutonomyAction_Value {
if m != nil { if m != nil {
...@@ -185,13 +194,20 @@ func (m *AutonomyAction) GetRvkPropProject() *RevokeProposalProject { ...@@ -185,13 +194,20 @@ func (m *AutonomyAction) GetRvkPropProject() *RevokeProposalProject {
return nil return nil
} }
func (m *AutonomyAction) GetVotePropProject() *VoteProposalBoard { func (m *AutonomyAction) GetVotePropProject() *VoteProposalProject {
if x, ok := m.GetValue().(*AutonomyAction_VotePropProject); ok { if x, ok := m.GetValue().(*AutonomyAction_VotePropProject); ok {
return x.VotePropProject return x.VotePropProject
} }
return nil return nil
} }
func (m *AutonomyAction) GetPubVotePropProject() *PubVoteProposalProject {
if x, ok := m.GetValue().(*AutonomyAction_PubVotePropProject); ok {
return x.PubVotePropProject
}
return nil
}
func (m *AutonomyAction) GetTmintPropProject() *TerminateProposalProject { func (m *AutonomyAction) GetTmintPropProject() *TerminateProposalProject {
if x, ok := m.GetValue().(*AutonomyAction_TmintPropProject); ok { if x, ok := m.GetValue().(*AutonomyAction_TmintPropProject); ok {
return x.TmintPropProject return x.TmintPropProject
...@@ -213,7 +229,7 @@ func (m *AutonomyAction) GetRvkPropRule() *RevokeProposalRule { ...@@ -213,7 +229,7 @@ func (m *AutonomyAction) GetRvkPropRule() *RevokeProposalRule {
return nil return nil
} }
func (m *AutonomyAction) GetVotePropRule() *VoteProposalBoard { func (m *AutonomyAction) GetVotePropRule() *VoteProposalRule {
if x, ok := m.GetValue().(*AutonomyAction_VotePropRule); ok { if x, ok := m.GetValue().(*AutonomyAction_VotePropRule); ok {
return x.VotePropRule return x.VotePropRule
} }
...@@ -244,6 +260,7 @@ func (*AutonomyAction) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer ...@@ -244,6 +260,7 @@ func (*AutonomyAction) XXX_OneofFuncs() (func(msg proto.Message, b *proto.Buffer
(*AutonomyAction_PropProject)(nil), (*AutonomyAction_PropProject)(nil),
(*AutonomyAction_RvkPropProject)(nil), (*AutonomyAction_RvkPropProject)(nil),
(*AutonomyAction_VotePropProject)(nil), (*AutonomyAction_VotePropProject)(nil),
(*AutonomyAction_PubVotePropProject)(nil),
(*AutonomyAction_TmintPropProject)(nil), (*AutonomyAction_TmintPropProject)(nil),
(*AutonomyAction_PropRule)(nil), (*AutonomyAction_PropRule)(nil),
(*AutonomyAction_RvkPropRule)(nil), (*AutonomyAction_RvkPropRule)(nil),
...@@ -291,28 +308,33 @@ func _AutonomyAction_OneofMarshaler(msg proto.Message, b *proto.Buffer) error { ...@@ -291,28 +308,33 @@ func _AutonomyAction_OneofMarshaler(msg proto.Message, b *proto.Buffer) error {
if err := b.EncodeMessage(x.VotePropProject); err != nil { if err := b.EncodeMessage(x.VotePropProject); err != nil {
return err return err
} }
case *AutonomyAction_TmintPropProject: case *AutonomyAction_PubVotePropProject:
b.EncodeVarint(8<<3 | proto.WireBytes) b.EncodeVarint(8<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.PubVotePropProject); err != nil {
return err
}
case *AutonomyAction_TmintPropProject:
b.EncodeVarint(9<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.TmintPropProject); err != nil { if err := b.EncodeMessage(x.TmintPropProject); err != nil {
return err return err
} }
case *AutonomyAction_PropRule: case *AutonomyAction_PropRule:
b.EncodeVarint(9<<3 | proto.WireBytes) b.EncodeVarint(10<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.PropRule); err != nil { if err := b.EncodeMessage(x.PropRule); err != nil {
return err return err
} }
case *AutonomyAction_RvkPropRule: case *AutonomyAction_RvkPropRule:
b.EncodeVarint(10<<3 | proto.WireBytes) b.EncodeVarint(11<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.RvkPropRule); err != nil { if err := b.EncodeMessage(x.RvkPropRule); err != nil {
return err return err
} }
case *AutonomyAction_VotePropRule: case *AutonomyAction_VotePropRule:
b.EncodeVarint(11<<3 | proto.WireBytes) b.EncodeVarint(12<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.VotePropRule); err != nil { if err := b.EncodeMessage(x.VotePropRule); err != nil {
return err return err
} }
case *AutonomyAction_TmintPropRule: case *AutonomyAction_TmintPropRule:
b.EncodeVarint(12<<3 | proto.WireBytes) b.EncodeVarint(13<<3 | proto.WireBytes)
if err := b.EncodeMessage(x.TmintPropRule); err != nil { if err := b.EncodeMessage(x.TmintPropRule); err != nil {
return err return err
} }
...@@ -378,11 +400,19 @@ func _AutonomyAction_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto ...@@ -378,11 +400,19 @@ func _AutonomyAction_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto
if wire != proto.WireBytes { if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType return true, proto.ErrInternalBadWireType
} }
msg := new(VoteProposalBoard) msg := new(VoteProposalProject)
err := b.DecodeMessage(msg) err := b.DecodeMessage(msg)
m.Value = &AutonomyAction_VotePropProject{msg} m.Value = &AutonomyAction_VotePropProject{msg}
return true, err return true, err
case 8: // value.tmintPropProject case 8: // value.pubVotePropProject
if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType
}
msg := new(PubVoteProposalProject)
err := b.DecodeMessage(msg)
m.Value = &AutonomyAction_PubVotePropProject{msg}
return true, err
case 9: // value.tmintPropProject
if wire != proto.WireBytes { if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType return true, proto.ErrInternalBadWireType
} }
...@@ -390,7 +420,7 @@ func _AutonomyAction_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto ...@@ -390,7 +420,7 @@ func _AutonomyAction_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto
err := b.DecodeMessage(msg) err := b.DecodeMessage(msg)
m.Value = &AutonomyAction_TmintPropProject{msg} m.Value = &AutonomyAction_TmintPropProject{msg}
return true, err return true, err
case 9: // value.propRule case 10: // value.propRule
if wire != proto.WireBytes { if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType return true, proto.ErrInternalBadWireType
} }
...@@ -398,7 +428,7 @@ func _AutonomyAction_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto ...@@ -398,7 +428,7 @@ func _AutonomyAction_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto
err := b.DecodeMessage(msg) err := b.DecodeMessage(msg)
m.Value = &AutonomyAction_PropRule{msg} m.Value = &AutonomyAction_PropRule{msg}
return true, err return true, err
case 10: // value.rvkPropRule case 11: // value.rvkPropRule
if wire != proto.WireBytes { if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType return true, proto.ErrInternalBadWireType
} }
...@@ -406,15 +436,15 @@ func _AutonomyAction_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto ...@@ -406,15 +436,15 @@ func _AutonomyAction_OneofUnmarshaler(msg proto.Message, tag, wire int, b *proto
err := b.DecodeMessage(msg) err := b.DecodeMessage(msg)
m.Value = &AutonomyAction_RvkPropRule{msg} m.Value = &AutonomyAction_RvkPropRule{msg}
return true, err return true, err
case 11: // value.votePropRule case 12: // value.votePropRule
if wire != proto.WireBytes { if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType return true, proto.ErrInternalBadWireType
} }
msg := new(VoteProposalBoard) msg := new(VoteProposalRule)
err := b.DecodeMessage(msg) err := b.DecodeMessage(msg)
m.Value = &AutonomyAction_VotePropRule{msg} m.Value = &AutonomyAction_VotePropRule{msg}
return true, err return true, err
case 12: // value.tmintPropRule case 13: // value.tmintPropRule
if wire != proto.WireBytes { if wire != proto.WireBytes {
return true, proto.ErrInternalBadWireType return true, proto.ErrInternalBadWireType
} }
...@@ -466,29 +496,34 @@ func _AutonomyAction_OneofSizer(msg proto.Message) (n int) { ...@@ -466,29 +496,34 @@ func _AutonomyAction_OneofSizer(msg proto.Message) (n int) {
n += proto.SizeVarint(7<<3 | proto.WireBytes) n += proto.SizeVarint(7<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s)) n += proto.SizeVarint(uint64(s))
n += s n += s
case *AutonomyAction_PubVotePropProject:
s := proto.Size(x.PubVotePropProject)
n += proto.SizeVarint(8<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s))
n += s
case *AutonomyAction_TmintPropProject: case *AutonomyAction_TmintPropProject:
s := proto.Size(x.TmintPropProject) s := proto.Size(x.TmintPropProject)
n += proto.SizeVarint(8<<3 | proto.WireBytes) n += proto.SizeVarint(9<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s)) n += proto.SizeVarint(uint64(s))
n += s n += s
case *AutonomyAction_PropRule: case *AutonomyAction_PropRule:
s := proto.Size(x.PropRule) s := proto.Size(x.PropRule)
n += proto.SizeVarint(9<<3 | proto.WireBytes) n += proto.SizeVarint(10<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s)) n += proto.SizeVarint(uint64(s))
n += s n += s
case *AutonomyAction_RvkPropRule: case *AutonomyAction_RvkPropRule:
s := proto.Size(x.RvkPropRule) s := proto.Size(x.RvkPropRule)
n += proto.SizeVarint(10<<3 | proto.WireBytes) n += proto.SizeVarint(11<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s)) n += proto.SizeVarint(uint64(s))
n += s n += s
case *AutonomyAction_VotePropRule: case *AutonomyAction_VotePropRule:
s := proto.Size(x.VotePropRule) s := proto.Size(x.VotePropRule)
n += proto.SizeVarint(11<<3 | proto.WireBytes) n += proto.SizeVarint(12<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s)) n += proto.SizeVarint(uint64(s))
n += s n += s
case *AutonomyAction_TmintPropRule: case *AutonomyAction_TmintPropRule:
s := proto.Size(x.TmintPropRule) s := proto.Size(x.TmintPropRule)
n += proto.SizeVarint(12<<3 | proto.WireBytes) n += proto.SizeVarint(13<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s)) n += proto.SizeVarint(uint64(s))
n += s n += s
case nil: case nil:
...@@ -505,28 +540,30 @@ func init() { ...@@ -505,28 +540,30 @@ func init() {
func init() { proto.RegisterFile("autonomy.proto", fileDescriptor0) } func init() { proto.RegisterFile("autonomy.proto", fileDescriptor0) }
var fileDescriptor0 = []byte{ var fileDescriptor0 = []byte{
// 366 bytes of a gzipped FileDescriptorProto // 388 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x93, 0xcd, 0x6a, 0xf2, 0x40, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x93, 0x4b, 0x6b, 0xe2, 0x50,
0x14, 0x86, 0xd5, 0xef, 0x8b, 0x3f, 0x27, 0x26, 0x2d, 0xa7, 0xa5, 0xa4, 0xd2, 0x52, 0xe9, 0xca, 0x14, 0x80, 0xd5, 0x99, 0xf8, 0x38, 0x31, 0x99, 0xe1, 0xcc, 0x30, 0x93, 0x91, 0x19, 0x46, 0xba,
0x95, 0xd0, 0x9f, 0x55, 0xa1, 0x45, 0x45, 0x5a, 0x37, 0x05, 0x09, 0xa5, 0xfb, 0x68, 0x67, 0x61, 0x72, 0x25, 0xf4, 0xb1, 0x2a, 0x08, 0x2a, 0xc5, 0xba, 0x29, 0x0d, 0xa1, 0xb8, 0x8f, 0xf6, 0x2e,
0x8d, 0x99, 0x30, 0x4e, 0x02, 0xb9, 0xb8, 0xde, 0x5b, 0xc9, 0x71, 0x92, 0x98, 0x89, 0xc5, 0x5d, 0xac, 0x31, 0x37, 0x5c, 0x6f, 0x02, 0xf9, 0x15, 0xfd, 0xcb, 0x25, 0xc7, 0x9b, 0xc7, 0x8d, 0xe9,
0x92, 0x73, 0x9e, 0x87, 0x79, 0xdf, 0x30, 0x60, 0x7b, 0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00, 0x56, 0x71, 0x04, 0xf1, 0x96, 0xf6, 0x7e, 0x2f, 0x8e, 0x57, 0x12, 0x1d, 0x42, 0x1b,
0x6f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x17, 0x5d, 0xfb, 0x98, 0x87, 0x03, 0x00, 0x00, 0x3a, 0x32, 0x75, 0xec, 0x71, 0x7b, 0x62, 0x78, 0x1d, 0x99, 0x2e, 0x7b, 0x60, 0x24, 0x7e, 0x10,
0xb3, 0x6d, 0x97, 0x3e, 0xcc, 0xdb, 0x8f, 0x00, 0x00, 0x00, 0xff, 0xff, 0x5a, 0xbe, 0x86, 0xe9,
0xd9, 0x03, 0x00, 0x00,
} }
...@@ -15,7 +15,7 @@ var _ = math.Inf ...@@ -15,7 +15,7 @@ var _ = math.Inf
type AutonomyProposalBoard struct { type AutonomyProposalBoard struct {
PropBoard *ProposalBoard `protobuf:"bytes,1,opt,name=propBoard" json:"propBoard,omitempty"` PropBoard *ProposalBoard `protobuf:"bytes,1,opt,name=propBoard" json:"propBoard,omitempty"`
// 全体持票人投票结果 // 全体持票人投票结果
Res *VotesResult `protobuf:"bytes,2,opt,name=res" json:"res,omitempty"` VoteResult *VoteResult `protobuf:"bytes,2,opt,name=voteResult" json:"voteResult,omitempty"`
// 状态 // 状态
Status int32 `protobuf:"varint,3,opt,name=status" json:"status,omitempty"` Status int32 `protobuf:"varint,3,opt,name=status" json:"status,omitempty"`
Address string `protobuf:"bytes,4,opt,name=address" json:"address,omitempty"` Address string `protobuf:"bytes,4,opt,name=address" json:"address,omitempty"`
...@@ -35,9 +35,9 @@ func (m *AutonomyProposalBoard) GetPropBoard() *ProposalBoard { ...@@ -35,9 +35,9 @@ func (m *AutonomyProposalBoard) GetPropBoard() *ProposalBoard {
return nil return nil
} }
func (m *AutonomyProposalBoard) GetRes() *VotesResult { func (m *AutonomyProposalBoard) GetVoteResult() *VoteResult {
if m != nil { if m != nil {
return m.Res return m.VoteResult
} }
return nil return nil
} }
...@@ -316,37 +316,37 @@ func init() { ...@@ -316,37 +316,37 @@ func init() {
func init() { proto.RegisterFile("board.proto", fileDescriptor1) } func init() { proto.RegisterFile("board.proto", fileDescriptor1) }
var fileDescriptor1 = []byte{ var fileDescriptor1 = []byte{
// 498 bytes of a gzipped FileDescriptorProto // 499 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0x5d, 0x8b, 0xd4, 0x30, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0x4d, 0x6f, 0xd4, 0x30,
0x14, 0x25, 0x76, 0x3a, 0xb3, 0xbd, 0xcb, 0xca, 0x1a, 0x67, 0xd7, 0xb2, 0x2c, 0x52, 0x8a, 0x48, 0x10, 0x95, 0xbb, 0x9b, 0xb4, 0x99, 0xaa, 0xa8, 0x35, 0xdb, 0x12, 0x55, 0x15, 0x8a, 0x72, 0x40,
0xf1, 0x61, 0x90, 0xf5, 0x03, 0xf1, 0xcd, 0x41, 0x41, 0x41, 0x41, 0x83, 0xfa, 0x9e, 0x6d, 0xaf, 0x11, 0x87, 0x15, 0x94, 0x0f, 0x21, 0x6e, 0xac, 0x40, 0x02, 0x09, 0x24, 0xb0, 0x80, 0xbb, 0x9b,
0x4e, 0xd9, 0xb6, 0x89, 0x49, 0x3a, 0xd8, 0x37, 0xff, 0xa2, 0xbf, 0xc2, 0xbf, 0x21, 0x49, 0x33, 0x0c, 0x6c, 0xd4, 0x24, 0x36, 0x8e, 0xb3, 0x22, 0x37, 0x7e, 0x29, 0x57, 0xfe, 0x06, 0xca, 0xc4,
0x76, 0xba, 0x0e, 0xba, 0xfb, 0xd6, 0x73, 0x73, 0x6e, 0x72, 0x4f, 0x72, 0x4e, 0x61, 0xff, 0x5c, 0xdb, 0x6c, 0xca, 0x0a, 0xe8, 0x2d, 0x6f, 0xfc, 0x9e, 0x3d, 0x63, 0xbf, 0x17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, 0xd4, 0xe6, 0xaa,
0xbb, 0x74, 0x28, 0x0c, 0x79, 0x98, 0x38, 0xcb, 0xf8, 0x3c, 0x7c, 0x82, 0x3b, 0x0c, 0x65, 0xd5, 0x72, 0x2e, 0x1d, 0x0a, 0x43, 0x1e, 0xa6, 0x64, 0x19, 0x97, 0x87, 0x4f, 0x70, 0x47, 0xa0, 0x2e,
0xed, 0x38, 0xfc, 0xb9, 0x0b, 0xf9, 0xb2, 0xf7, 0x37, 0x49, 0x82, 0xff, 0x4a, 0x1d, 0xe8, 0xe7, 0xda, 0x2d, 0x87, 0x3f, 0xa7, 0xc4, 0x2f, 0x7a, 0x7f, 0xb3, 0x68, 0xf2, 0xcf, 0x51, 0x07, 0xfa,
0x53, 0xf7, 0x07, 0x79, 0xf4, 0x3b, 0x00, 0x00, 0xff, 0xff, 0x83, 0xda, 0x5e, 0xb4, 0x66, 0x04, 0x85, 0x4f, 0xbf, 0x93, 0x47, 0xbf, 0x03, 0x00, 0x00, 0xff, 0xff, 0x3f, 0xce, 0x7c, 0xf0, 0x73,
0x00, 0x00, 0x04, 0x00, 0x00,
} }
...@@ -70,6 +70,20 @@ const ( ...@@ -70,6 +70,20 @@ const (
) )
const ( const (
AutonomyStatusProposalProject = iota + 1
AutonomyStatusRvkPropProject
AutonomyStatusVotePropProject
AutonomyStatusTmintPropProject
)
const (
AutonomyStatusProposalRule = iota + 1
AutonomyStatusRvkPropRule
AutonomyStatusVotePropRule
AutonomyStatusTmintPropRule
)
const (
// GetProposalBoard 用于在cmd里面的区分不同的查询 // GetProposalBoard 用于在cmd里面的区分不同的查询
GetProposalBoard = "GetProposalBoard" GetProposalBoard = "GetProposalBoard"
// GetProposalProject 用于在cmd里面的区分不同的查询 // GetProposalProject 用于在cmd里面的区分不同的查询
......
...@@ -12,7 +12,7 @@ var _ = proto.Marshal ...@@ -12,7 +12,7 @@ var _ = proto.Marshal
var _ = fmt.Errorf var _ = fmt.Errorf
var _ = math.Inf var _ = math.Inf
type VotesResult struct { type VoteResult struct {
// 总票数 // 总票数
TotalVotes int32 `protobuf:"varint,1,opt,name=totalVotes" json:"totalVotes,omitempty"` TotalVotes int32 `protobuf:"varint,1,opt,name=totalVotes" json:"totalVotes,omitempty"`
// 赞成票 // 赞成票
...@@ -23,39 +23,74 @@ type VotesResult struct { ...@@ -23,39 +23,74 @@ type VotesResult struct {
Pass bool `protobuf:"varint,4,opt,name=pass" json:"pass,omitempty"` Pass bool `protobuf:"varint,4,opt,name=pass" json:"pass,omitempty"`
} }
func (m *VotesResult) Reset() { *m = VotesResult{} } func (m *VoteResult) Reset() { *m = VoteResult{} }
func (m *VotesResult) String() string { return proto.CompactTextString(m) } func (m *VoteResult) String() string { return proto.CompactTextString(m) }
func (*VotesResult) ProtoMessage() {} func (*VoteResult) ProtoMessage() {}
func (*VotesResult) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{0} } func (*VoteResult) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{0} }
func (m *VotesResult) GetTotalVotes() int32 { func (m *VoteResult) GetTotalVotes() int32 {
if m != nil { if m != nil {
return m.TotalVotes return m.TotalVotes
} }
return 0 return 0
} }
func (m *VotesResult) GetApproveVotes() int32 { func (m *VoteResult) GetApproveVotes() int32 {
if m != nil { if m != nil {
return m.ApproveVotes return m.ApproveVotes
} }
return 0 return 0
} }
func (m *VotesResult) GetOpposeVotes() int32 { func (m *VoteResult) GetOpposeVotes() int32 {
if m != nil { if m != nil {
return m.OpposeVotes return m.OpposeVotes
} }
return 0 return 0
} }
func (m *VotesResult) GetPass() bool { func (m *VoteResult) GetPass() bool {
if m != nil { if m != nil {
return m.Pass return m.Pass
} }
return false return false
} }
type PublicVote struct {
// 是否需要公示
Publicity bool `protobuf:"varint,1,opt,name=publicity" json:"publicity,omitempty"`
// 全体持票人反对票
OpposeVotes int32 `protobuf:"varint,2,opt,name=opposeVotes" json:"opposeVotes,omitempty"`
// 是否通过
PubPass bool `protobuf:"varint,3,opt,name=pubPass" json:"pubPass,omitempty"`
}
func (m *PublicVote) Reset() { *m = PublicVote{} }
func (m *PublicVote) String() string { return proto.CompactTextString(m) }
func (*PublicVote) ProtoMessage() {}
func (*PublicVote) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{1} }
func (m *PublicVote) GetPublicity() bool {
if m != nil {
return m.Publicity
}
return false
}
func (m *PublicVote) GetOpposeVotes() int32 {
if m != nil {
return m.OpposeVotes
}
return 0
}
func (m *PublicVote) GetPubPass() bool {
if m != nil {
return m.PubPass
}
return false
}
type VotesRecord struct { type VotesRecord struct {
Address []string `protobuf:"bytes,1,rep,name=address" json:"address,omitempty"` Address []string `protobuf:"bytes,1,rep,name=address" json:"address,omitempty"`
} }
...@@ -63,7 +98,7 @@ type VotesRecord struct { ...@@ -63,7 +98,7 @@ type VotesRecord struct {
func (m *VotesRecord) Reset() { *m = VotesRecord{} } func (m *VotesRecord) Reset() { *m = VotesRecord{} }
func (m *VotesRecord) String() string { return proto.CompactTextString(m) } func (m *VotesRecord) String() string { return proto.CompactTextString(m) }
func (*VotesRecord) ProtoMessage() {} func (*VotesRecord) ProtoMessage() {}
func (*VotesRecord) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{1} } func (*VotesRecord) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{2} }
func (m *VotesRecord) GetAddress() []string { func (m *VotesRecord) GetAddress() []string {
if m != nil { if m != nil {
...@@ -73,23 +108,26 @@ func (m *VotesRecord) GetAddress() []string { ...@@ -73,23 +108,26 @@ func (m *VotesRecord) GetAddress() []string {
} }
func init() { func init() {
proto.RegisterType((*VotesResult)(nil), "types.VotesResult") proto.RegisterType((*VoteResult)(nil), "types.VoteResult")
proto.RegisterType((*PublicVote)(nil), "types.PublicVote")
proto.RegisterType((*VotesRecord)(nil), "types.VotesRecord") proto.RegisterType((*VotesRecord)(nil), "types.VotesRecord")
} }
func init() { proto.RegisterFile("lcommon.proto", fileDescriptor2) } func init() { proto.RegisterFile("lcommon.proto", fileDescriptor2) }
var fileDescriptor2 = []byte{ var fileDescriptor2 = []byte{
// 161 bytes of a gzipped FileDescriptorProto // 205 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x54, 0x8f, 0xbd, 0xae, 0xc2, 0x30, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x64, 0x90, 0xcd, 0x4e, 0x85, 0x30,
0x0c, 0x46, 0x95, 0xdb, 0xf6, 0x02, 0x2e, 0x2c, 0x9e, 0x3a, 0xa1, 0xaa, 0x0b, 0x99, 0x58, 0x78, 0x10, 0x85, 0x53, 0x7e, 0x14, 0x06, 0xdd, 0x74, 0xc5, 0xc2, 0x18, 0xd2, 0x8d, 0xac, 0xdc, 0xf8,
0x93, 0x0c, 0xec, 0xa1, 0xc9, 0x96, 0x62, 0x2b, 0x36, 0x48, 0x3c, 0x01, 0xaf, 0x8d, 0x08, 0x3f, 0x22, 0xa4, 0x0b, 0xf7, 0x05, 0x6a, 0x42, 0x52, 0x9c, 0x49, 0x5b, 0x4c, 0x78, 0x01, 0x9f, 0xdb,
0x2a, 0x9b, 0x7d, 0x74, 0x86, 0xf3, 0xc1, 0x26, 0x8d, 0x34, 0x4d, 0x74, 0xde, 0x73, 0x26, 0x25, 0x74, 0x94, 0xc8, 0xbd, 0x77, 0xd7, 0xf3, 0xe5, 0x6b, 0xce, 0xcc, 0xc0, 0xa3, 0x9b, 0x70, 0x5d,
0x6c, 0xf4, 0xc6, 0x51, 0x86, 0xbb, 0x81, 0xf6, 0x48, 0x1a, 0xc5, 0x45, 0xb9, 0x24, 0xc5, 0x2d, 0xf1, 0xf3, 0x95, 0x3c, 0x46, 0x94, 0x65, 0xdc, 0xc9, 0x06, 0xf5, 0x2d, 0x00, 0xde, 0x31, 0x5a,
0x80, 0x92, 0xfa, 0x54, 0x58, 0x67, 0x7a, 0x63, 0x1b, 0x37, 0x23, 0x38, 0xc0, 0xda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0x7b, 0x84, 0x76, 0x38, 0x01, 0x00, 0x00,
} }
...@@ -15,15 +15,14 @@ var _ = math.Inf ...@@ -15,15 +15,14 @@ var _ = math.Inf
type AutonomyProposalProject struct { type AutonomyProposalProject struct {
PropProject *ProposalProject `protobuf:"bytes,1,opt,name=propProject" json:"propProject,omitempty"` PropProject *ProposalProject `protobuf:"bytes,1,opt,name=propProject" json:"propProject,omitempty"`
// 董事会投票结果 // 董事会投票结果
BoardResult *VotesResult `protobuf:"bytes,2,opt,name=boardResult" json:"boardResult,omitempty"` BoardVoteRes *VoteResult `protobuf:"bytes,2,opt,name=boardVoteRes" json:"boardVoteRes,omitempty"`
// 是否需要公示 // 公示投票
Publicity bool `protobuf:"varint,3,opt,name=publicity" json:"publicity,omitempty"` PubVote *PublicVote `protobuf:"bytes,3,opt,name=pubVote" json:"pubVote,omitempty"`
// 全体持票人反对票
OpposeVotes int32 `protobuf:"varint,4,opt,name=opposeVotes" json:"opposeVotes,omitempty"`
// 是否通过
PubPass bool `protobuf:"varint,5,opt,name=pubPass" json:"pubPass,omitempty"`
// 状态 // 状态
Status int32 `protobuf:"varint,6,opt,name=status" json:"status,omitempty"` Status int32 `protobuf:"varint,4,opt,name=status" json:"status,omitempty"`
Address string `protobuf:"bytes,5,opt,name=address" json:"address,omitempty"`
Height int64 `protobuf:"varint,6,opt,name=height" json:"height,omitempty"`
Index int32 `protobuf:"varint,7,opt,name=index" json:"index,omitempty"`
} }
func (m *AutonomyProposalProject) Reset() { *m = AutonomyProposalProject{} } func (m *AutonomyProposalProject) Reset() { *m = AutonomyProposalProject{} }
...@@ -38,37 +37,44 @@ func (m *AutonomyProposalProject) GetPropProject() *ProposalProject { ...@@ -38,37 +37,44 @@ func (m *AutonomyProposalProject) GetPropProject() *ProposalProject {
return nil return nil
} }
func (m *AutonomyProposalProject) GetBoardResult() *VotesResult { func (m *AutonomyProposalProject) GetBoardVoteRes() *VoteResult {
if m != nil { if m != nil {
return m.BoardResult return m.BoardVoteRes
} }
return nil return nil
} }
func (m *AutonomyProposalProject) GetPublicity() bool { func (m *AutonomyProposalProject) GetPubVote() *PublicVote {
if m != nil { if m != nil {
return m.Publicity return m.PubVote
} }
return false return nil
} }
func (m *AutonomyProposalProject) GetOpposeVotes() int32 { func (m *AutonomyProposalProject) GetStatus() int32 {
if m != nil { if m != nil {
return m.OpposeVotes return m.Status
} }
return 0 return 0
} }
func (m *AutonomyProposalProject) GetPubPass() bool { func (m *AutonomyProposalProject) GetAddress() string {
if m != nil { if m != nil {
return m.PubPass return m.Address
} }
return false return ""
} }
func (m *AutonomyProposalProject) GetStatus() int32 { func (m *AutonomyProposalProject) GetHeight() int64 {
if m != nil { if m != nil {
return m.Status return m.Height
}
return 0
}
func (m *AutonomyProposalProject) GetIndex() int32 {
if m != nil {
return m.Index
} }
return 0 return 0
} }
...@@ -84,7 +90,7 @@ type ProposalProject struct { ...@@ -84,7 +90,7 @@ type ProposalProject struct {
Production string `protobuf:"bytes,6,opt,name=production" json:"production,omitempty"` Production string `protobuf:"bytes,6,opt,name=production" json:"production,omitempty"`
Description string `protobuf:"bytes,7,opt,name=description" json:"description,omitempty"` Description string `protobuf:"bytes,7,opt,name=description" json:"description,omitempty"`
Contractor string `protobuf:"bytes,8,opt,name=contractor" json:"contractor,omitempty"` Contractor string `protobuf:"bytes,8,opt,name=contractor" json:"contractor,omitempty"`
Amount int32 `protobuf:"varint,9,opt,name=amount" json:"amount,omitempty"` Amount int64 `protobuf:"varint,9,opt,name=amount" json:"amount,omitempty"`
AmountDetail string `protobuf:"bytes,10,opt,name=amountDetail" json:"amountDetail,omitempty"` AmountDetail string `protobuf:"bytes,10,opt,name=amountDetail" json:"amountDetail,omitempty"`
// 支付相关 // 支付相关
ToAddr string `protobuf:"bytes,11,opt,name=toAddr" json:"toAddr,omitempty"` ToAddr string `protobuf:"bytes,11,opt,name=toAddr" json:"toAddr,omitempty"`
...@@ -156,7 +162,7 @@ func (m *ProposalProject) GetContractor() string { ...@@ -156,7 +162,7 @@ func (m *ProposalProject) GetContractor() string {
return "" return ""
} }
func (m *ProposalProject) GetAmount() int32 { func (m *ProposalProject) GetAmount() int64 {
if m != nil { if m != nil {
return m.Amount return m.Amount
} }
...@@ -221,6 +227,54 @@ func (m *RevokeProposalProject) GetProposalID() string { ...@@ -221,6 +227,54 @@ func (m *RevokeProposalProject) GetProposalID() string {
return "" return ""
} }
type VoteProposalProject struct {
ProposalID string `protobuf:"bytes,1,opt,name=proposalID" json:"proposalID,omitempty"`
Approve bool `protobuf:"varint,2,opt,name=approve" json:"approve,omitempty"`
}
func (m *VoteProposalProject) Reset() { *m = VoteProposalProject{} }
func (m *VoteProposalProject) String() string { return proto.CompactTextString(m) }
func (*VoteProposalProject) ProtoMessage() {}
func (*VoteProposalProject) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{3} }
func (m *VoteProposalProject) GetProposalID() string {
if m != nil {
return m.ProposalID
}
return ""
}
func (m *VoteProposalProject) GetApprove() bool {
if m != nil {
return m.Approve
}
return false
}
type PubVoteProposalProject struct {
ProposalID string `protobuf:"bytes,1,opt,name=proposalID" json:"proposalID,omitempty"`
Oppose bool `protobuf:"varint,2,opt,name=oppose" json:"oppose,omitempty"`
}
func (m *PubVoteProposalProject) Reset() { *m = PubVoteProposalProject{} }
func (m *PubVoteProposalProject) String() string { return proto.CompactTextString(m) }
func (*PubVoteProposalProject) ProtoMessage() {}
func (*PubVoteProposalProject) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{4} }
func (m *PubVoteProposalProject) GetProposalID() string {
if m != nil {
return m.ProposalID
}
return ""
}
func (m *PubVoteProposalProject) GetOppose() bool {
if m != nil {
return m.Oppose
}
return false
}
type TerminateProposalProject struct { type TerminateProposalProject struct {
ProposalID string `protobuf:"bytes,1,opt,name=proposalID" json:"proposalID,omitempty"` ProposalID string `protobuf:"bytes,1,opt,name=proposalID" json:"proposalID,omitempty"`
} }
...@@ -228,7 +282,7 @@ type TerminateProposalProject struct { ...@@ -228,7 +282,7 @@ type TerminateProposalProject struct {
func (m *TerminateProposalProject) Reset() { *m = TerminateProposalProject{} } func (m *TerminateProposalProject) Reset() { *m = TerminateProposalProject{} }
func (m *TerminateProposalProject) String() string { return proto.CompactTextString(m) } func (m *TerminateProposalProject) String() string { return proto.CompactTextString(m) }
func (*TerminateProposalProject) ProtoMessage() {} func (*TerminateProposalProject) ProtoMessage() {}
func (*TerminateProposalProject) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{3} } func (*TerminateProposalProject) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{5} }
func (m *TerminateProposalProject) GetProposalID() string { func (m *TerminateProposalProject) GetProposalID() string {
if m != nil { if m != nil {
...@@ -246,7 +300,7 @@ type ReceiptProposalProject struct { ...@@ -246,7 +300,7 @@ type ReceiptProposalProject struct {
func (m *ReceiptProposalProject) Reset() { *m = ReceiptProposalProject{} } func (m *ReceiptProposalProject) Reset() { *m = ReceiptProposalProject{} }
func (m *ReceiptProposalProject) String() string { return proto.CompactTextString(m) } func (m *ReceiptProposalProject) String() string { return proto.CompactTextString(m) }
func (*ReceiptProposalProject) ProtoMessage() {} func (*ReceiptProposalProject) ProtoMessage() {}
func (*ReceiptProposalProject) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{4} } func (*ReceiptProposalProject) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{6} }
func (m *ReceiptProposalProject) GetPrev() *AutonomyProposalProject { func (m *ReceiptProposalProject) GetPrev() *AutonomyProposalProject {
if m != nil { if m != nil {
...@@ -270,7 +324,7 @@ type LocalProposalProject struct { ...@@ -270,7 +324,7 @@ type LocalProposalProject struct {
func (m *LocalProposalProject) Reset() { *m = LocalProposalProject{} } func (m *LocalProposalProject) Reset() { *m = LocalProposalProject{} }
func (m *LocalProposalProject) String() string { return proto.CompactTextString(m) } func (m *LocalProposalProject) String() string { return proto.CompactTextString(m) }
func (*LocalProposalProject) ProtoMessage() {} func (*LocalProposalProject) ProtoMessage() {}
func (*LocalProposalProject) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{5} } func (*LocalProposalProject) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{7} }
func (m *LocalProposalProject) GetPropPrj() *AutonomyProposalProject { func (m *LocalProposalProject) GetPropPrj() *AutonomyProposalProject {
if m != nil { if m != nil {
...@@ -294,7 +348,7 @@ type ReplyQueryProposalProject struct { ...@@ -294,7 +348,7 @@ type ReplyQueryProposalProject struct {
func (m *ReplyQueryProposalProject) Reset() { *m = ReplyQueryProposalProject{} } func (m *ReplyQueryProposalProject) Reset() { *m = ReplyQueryProposalProject{} }
func (m *ReplyQueryProposalProject) String() string { return proto.CompactTextString(m) } func (m *ReplyQueryProposalProject) String() string { return proto.CompactTextString(m) }
func (*ReplyQueryProposalProject) ProtoMessage() {} func (*ReplyQueryProposalProject) ProtoMessage() {}
func (*ReplyQueryProposalProject) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{6} } func (*ReplyQueryProposalProject) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{8} }
func (m *ReplyQueryProposalProject) GetProposalID() string { func (m *ReplyQueryProposalProject) GetProposalID() string {
if m != nil { if m != nil {
...@@ -310,7 +364,7 @@ type ReplyProposalProject struct { ...@@ -310,7 +364,7 @@ type ReplyProposalProject struct {
func (m *ReplyProposalProject) Reset() { *m = ReplyProposalProject{} } func (m *ReplyProposalProject) Reset() { *m = ReplyProposalProject{} }
func (m *ReplyProposalProject) String() string { return proto.CompactTextString(m) } func (m *ReplyProposalProject) String() string { return proto.CompactTextString(m) }
func (*ReplyProposalProject) ProtoMessage() {} func (*ReplyProposalProject) ProtoMessage() {}
func (*ReplyProposalProject) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{7} } func (*ReplyProposalProject) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{9} }
func (m *ReplyProposalProject) GetPropProjects() []*LocalProposalProject { func (m *ReplyProposalProject) GetPropProjects() []*LocalProposalProject {
if m != nil { if m != nil {
...@@ -323,6 +377,8 @@ func init() { ...@@ -323,6 +377,8 @@ func init() {
proto.RegisterType((*AutonomyProposalProject)(nil), "types.AutonomyProposalProject") proto.RegisterType((*AutonomyProposalProject)(nil), "types.AutonomyProposalProject")
proto.RegisterType((*ProposalProject)(nil), "types.ProposalProject") proto.RegisterType((*ProposalProject)(nil), "types.ProposalProject")
proto.RegisterType((*RevokeProposalProject)(nil), "types.RevokeProposalProject") proto.RegisterType((*RevokeProposalProject)(nil), "types.RevokeProposalProject")
proto.RegisterType((*VoteProposalProject)(nil), "types.VoteProposalProject")
proto.RegisterType((*PubVoteProposalProject)(nil), "types.PubVoteProposalProject")
proto.RegisterType((*TerminateProposalProject)(nil), "types.TerminateProposalProject") proto.RegisterType((*TerminateProposalProject)(nil), "types.TerminateProposalProject")
proto.RegisterType((*ReceiptProposalProject)(nil), "types.ReceiptProposalProject") proto.RegisterType((*ReceiptProposalProject)(nil), "types.ReceiptProposalProject")
proto.RegisterType((*LocalProposalProject)(nil), "types.LocalProposalProject") proto.RegisterType((*LocalProposalProject)(nil), "types.LocalProposalProject")
...@@ -333,42 +389,45 @@ func init() { ...@@ -333,42 +389,45 @@ func init() {
func init() { proto.RegisterFile("project.proto", fileDescriptor3) } func init() { proto.RegisterFile("project.proto", fileDescriptor3) }
var fileDescriptor3 = []byte{ var fileDescriptor3 = []byte{
// 579 bytes of a gzipped FileDescriptorProto // 628 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x94, 0x4f, 0x6f, 0xd4, 0x3c, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0xdf, 0x6f, 0xd3, 0x30,
0x10, 0xc6, 0x95, 0x6e, 0xd3, 0xed, 0xce, 0xf6, 0x9f, 0xfc, 0xf6, 0x2d, 0xa6, 0xa0, 0x2a, 0xca, 0x10, 0x56, 0xd7, 0xa5, 0x5d, 0xaf, 0xdd, 0x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6, 0xc8, 0xdc, 0xf4, 0xbd, 0x84, 0xc1,
0xc2, 0xc2, 0x2c, 0x78, 0x6b, 0xd4, 0x1e, 0xf7, 0x0f, 0xef, 0xf9, 0x7a, 0x6f, 0xba, 0x9d, 0x58,
0x32, 0xcc, 0x3a, 0xb4, 0xbf, 0x9f, 0xfc, 0x0a, 0x00, 0x00, 0xff, 0xff, 0x0b, 0x4e, 0x93, 0x26,
0xe6, 0x05, 0x00, 0x00,
} }
...@@ -15,7 +15,7 @@ var _ = math.Inf ...@@ -15,7 +15,7 @@ var _ = math.Inf
type AutonomyProposalRule struct { type AutonomyProposalRule struct {
PropRule *ProposalRule `protobuf:"bytes,1,opt,name=propRule" json:"propRule,omitempty"` PropRule *ProposalRule `protobuf:"bytes,1,opt,name=propRule" json:"propRule,omitempty"`
// 全体持票人投票结果 // 全体持票人投票结果
Res *VotesResult `protobuf:"bytes,2,opt,name=res" json:"res,omitempty"` Res *VoteResult `protobuf:"bytes,2,opt,name=res" json:"res,omitempty"`
// 状态 // 状态
Status int32 `protobuf:"varint,3,opt,name=status" json:"status,omitempty"` Status int32 `protobuf:"varint,3,opt,name=status" json:"status,omitempty"`
} }
...@@ -32,7 +32,7 @@ func (m *AutonomyProposalRule) GetPropRule() *ProposalRule { ...@@ -32,7 +32,7 @@ func (m *AutonomyProposalRule) GetPropRule() *ProposalRule {
return nil return nil
} }
func (m *AutonomyProposalRule) GetRes() *VotesResult { func (m *AutonomyProposalRule) GetRes() *VoteResult {
if m != nil { if m != nil {
return m.Res return m.Res
} }
...@@ -161,6 +161,30 @@ func (m *RevokeProposalRule) GetProposalID() string { ...@@ -161,6 +161,30 @@ func (m *RevokeProposalRule) GetProposalID() string {
return "" return ""
} }
type VoteProposalRule struct {
ProposalID string `protobuf:"bytes,1,opt,name=proposalID" json:"proposalID,omitempty"`
Approve bool `protobuf:"varint,2,opt,name=approve" json:"approve,omitempty"`
}
func (m *VoteProposalRule) Reset() { *m = VoteProposalRule{} }
func (m *VoteProposalRule) String() string { return proto.CompactTextString(m) }
func (*VoteProposalRule) ProtoMessage() {}
func (*VoteProposalRule) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{3} }
func (m *VoteProposalRule) GetProposalID() string {
if m != nil {
return m.ProposalID
}
return ""
}
func (m *VoteProposalRule) GetApprove() bool {
if m != nil {
return m.Approve
}
return false
}
type TerminateProposalRule struct { type TerminateProposalRule struct {
ProposalID string `protobuf:"bytes,1,opt,name=proposalID" json:"proposalID,omitempty"` ProposalID string `protobuf:"bytes,1,opt,name=proposalID" json:"proposalID,omitempty"`
} }
...@@ -168,7 +192,7 @@ type TerminateProposalRule struct { ...@@ -168,7 +192,7 @@ type TerminateProposalRule struct {
func (m *TerminateProposalRule) Reset() { *m = TerminateProposalRule{} } func (m *TerminateProposalRule) Reset() { *m = TerminateProposalRule{} }
func (m *TerminateProposalRule) String() string { return proto.CompactTextString(m) } func (m *TerminateProposalRule) String() string { return proto.CompactTextString(m) }
func (*TerminateProposalRule) ProtoMessage() {} func (*TerminateProposalRule) ProtoMessage() {}
func (*TerminateProposalRule) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{3} } func (*TerminateProposalRule) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{4} }
func (m *TerminateProposalRule) GetProposalID() string { func (m *TerminateProposalRule) GetProposalID() string {
if m != nil { if m != nil {
...@@ -186,7 +210,7 @@ type ReceiptProposalRule struct { ...@@ -186,7 +210,7 @@ type ReceiptProposalRule struct {
func (m *ReceiptProposalRule) Reset() { *m = ReceiptProposalRule{} } func (m *ReceiptProposalRule) Reset() { *m = ReceiptProposalRule{} }
func (m *ReceiptProposalRule) String() string { return proto.CompactTextString(m) } func (m *ReceiptProposalRule) String() string { return proto.CompactTextString(m) }
func (*ReceiptProposalRule) ProtoMessage() {} func (*ReceiptProposalRule) ProtoMessage() {}
func (*ReceiptProposalRule) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{4} } func (*ReceiptProposalRule) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{5} }
func (m *ReceiptProposalRule) GetPrev() *AutonomyProposalRule { func (m *ReceiptProposalRule) GetPrev() *AutonomyProposalRule {
if m != nil { if m != nil {
...@@ -210,7 +234,7 @@ type LocalProposalRule struct { ...@@ -210,7 +234,7 @@ type LocalProposalRule struct {
func (m *LocalProposalRule) Reset() { *m = LocalProposalRule{} } func (m *LocalProposalRule) Reset() { *m = LocalProposalRule{} }
func (m *LocalProposalRule) String() string { return proto.CompactTextString(m) } func (m *LocalProposalRule) String() string { return proto.CompactTextString(m) }
func (*LocalProposalRule) ProtoMessage() {} func (*LocalProposalRule) ProtoMessage() {}
func (*LocalProposalRule) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{5} } func (*LocalProposalRule) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{6} }
func (m *LocalProposalRule) GetPropRule() *AutonomyProposalRule { func (m *LocalProposalRule) GetPropRule() *AutonomyProposalRule {
if m != nil { if m != nil {
...@@ -234,7 +258,7 @@ type ReplyQueryProposalRule struct { ...@@ -234,7 +258,7 @@ type ReplyQueryProposalRule struct {
func (m *ReplyQueryProposalRule) Reset() { *m = ReplyQueryProposalRule{} } func (m *ReplyQueryProposalRule) Reset() { *m = ReplyQueryProposalRule{} }
func (m *ReplyQueryProposalRule) String() string { return proto.CompactTextString(m) } func (m *ReplyQueryProposalRule) String() string { return proto.CompactTextString(m) }
func (*ReplyQueryProposalRule) ProtoMessage() {} func (*ReplyQueryProposalRule) ProtoMessage() {}
func (*ReplyQueryProposalRule) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{6} } func (*ReplyQueryProposalRule) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{7} }
func (m *ReplyQueryProposalRule) GetProposalID() string { func (m *ReplyQueryProposalRule) GetProposalID() string {
if m != nil { if m != nil {
...@@ -250,7 +274,7 @@ type ReplyProposalRule struct { ...@@ -250,7 +274,7 @@ type ReplyProposalRule struct {
func (m *ReplyProposalRule) Reset() { *m = ReplyProposalRule{} } func (m *ReplyProposalRule) Reset() { *m = ReplyProposalRule{} }
func (m *ReplyProposalRule) String() string { return proto.CompactTextString(m) } func (m *ReplyProposalRule) String() string { return proto.CompactTextString(m) }
func (*ReplyProposalRule) ProtoMessage() {} func (*ReplyProposalRule) ProtoMessage() {}
func (*ReplyProposalRule) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{7} } func (*ReplyProposalRule) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{8} }
func (m *ReplyProposalRule) GetPropRules() []*LocalProposalRule { func (m *ReplyProposalRule) GetPropRules() []*LocalProposalRule {
if m != nil { if m != nil {
...@@ -263,6 +287,7 @@ func init() { ...@@ -263,6 +287,7 @@ func init() {
proto.RegisterType((*AutonomyProposalRule)(nil), "types.AutonomyProposalRule") proto.RegisterType((*AutonomyProposalRule)(nil), "types.AutonomyProposalRule")
proto.RegisterType((*ProposalRule)(nil), "types.ProposalRule") proto.RegisterType((*ProposalRule)(nil), "types.ProposalRule")
proto.RegisterType((*RevokeProposalRule)(nil), "types.RevokeProposalRule") proto.RegisterType((*RevokeProposalRule)(nil), "types.RevokeProposalRule")
proto.RegisterType((*VoteProposalRule)(nil), "types.VoteProposalRule")
proto.RegisterType((*TerminateProposalRule)(nil), "types.TerminateProposalRule") proto.RegisterType((*TerminateProposalRule)(nil), "types.TerminateProposalRule")
proto.RegisterType((*ReceiptProposalRule)(nil), "types.ReceiptProposalRule") proto.RegisterType((*ReceiptProposalRule)(nil), "types.ReceiptProposalRule")
proto.RegisterType((*LocalProposalRule)(nil), "types.LocalProposalRule") proto.RegisterType((*LocalProposalRule)(nil), "types.LocalProposalRule")
...@@ -273,35 +298,37 @@ func init() { ...@@ -273,35 +298,37 @@ func init() {
func init() { proto.RegisterFile("rule.proto", fileDescriptor4) } func init() { proto.RegisterFile("rule.proto", fileDescriptor4) }
var fileDescriptor4 = []byte{ var fileDescriptor4 = []byte{
// 479 bytes of a gzipped FileDescriptorProto // 500 bytes of a gzipped FileDescriptorProto
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23, 0x1b, 0x41, 0x1f, 0xa0,
0xed, 0xff, 0x00, 0x00, 0x00, 0xff, 0xff, 0x32, 0x78, 0xa2, 0x76, 0x2a, 0x04, 0x00, 0x00, 0xb7, 0x29, 0x6b, 0x43, 0x6f, 0xe4, 0xc7, 0xfd, 0xab, 0xb0, 0x6e, 0x72, 0xef, 0x83, 0xe4, 0x03,
0x3a, 0x6b, 0xf3, 0x7f, 0xca, 0xdb, 0x7f, 0x01, 0x00, 0x00, 0xff, 0xff, 0x4d, 0x3e, 0x74, 0x94,
0x77, 0x04, 0x00, 0x00,
} }
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