Commit 158281da authored by liuyuhang's avatar liuyuhang Committed by 33cn

modify some name

parent 49658b66
...@@ -18,10 +18,15 @@ import ( ...@@ -18,10 +18,15 @@ import (
const ( const (
minBoards = 3 minBoards = 3
maxBoards = 30 maxBoards = 30
lockAmount int64 = types.Coin * 1000 // 创建者消耗金额 publicPeriod = 120960 // 公示一周时间,以区块高度计算
ticketPrice = types.Coin * 3000 // 单张票价 ticketPrice = types.Coin * 3000 // 单张票价
participationRate int32 = 66 // 参与率以%计 largeProjectAmount = types.Coin * 100 *10000 // 重大项目公示金额阈值
approveRate int32 = 66 // 赞成率以%计 proposalAmount = types.Coin * 1000 // 创建者消耗金额
boardAttendRatio int32 = 66 // 董事会成员参与率,以%计,可修改
boardApproveRatio int32 = 66 // 董事会成员赞成率,以%计,可修改
pubAttendRatio int32 = 50 // 全体持票人参与率,以%计
pubApproveRatio int32 = 50 // 全体持票人赞成率,以%计
pubOpposeRatio int32 = 33 // 全体持票人否决率,以%计
) )
type action struct { type action struct {
...@@ -62,11 +67,11 @@ func (a *action) propBoard(prob *auty.ProposalBoard) (*types.Receipt, error) { ...@@ -62,11 +67,11 @@ func (a *action) propBoard(prob *auty.ProposalBoard) (*types.Receipt, error) {
return nil, err return nil, err
} }
} else {// 载入系统默认值 } else {// 载入系统默认值
rule.BoardAttendProb = participationRate rule.BoardAttendRatio = boardAttendRatio
rule.BoardPassProb = approveRate rule.BoardApproveRatio = boardApproveRatio
rule.OpposeProb = opposeRate rule.PubOpposeRatio = pubOpposeRatio
rule.ProposalAmount = lockAmount rule.ProposalAmount = proposalAmount
rule.PubAmountThreshold = largeAmount rule.LargeProjectAmount = largeProjectAmount
} }
receipt, err := a.coinsAccount.ExecFrozen(a.fromaddr, a.execaddr, rule.ProposalAmount) receipt, err := a.coinsAccount.ExecFrozen(a.fromaddr, a.execaddr, rule.ProposalAmount)
...@@ -242,8 +247,8 @@ func (a *action) votePropBoard(voteProb *auty.VoteProposalBoard) (*types.Receipt ...@@ -242,8 +247,8 @@ func (a *action) votePropBoard(voteProb *auty.VoteProposalBoard) (*types.Receipt
if cur.VoteResult.TotalVotes != 0 && if cur.VoteResult.TotalVotes != 0 &&
cur.VoteResult.ApproveVotes + cur.VoteResult.OpposeVotes != 0 && cur.VoteResult.ApproveVotes + cur.VoteResult.OpposeVotes != 0 &&
float32(cur.VoteResult.ApproveVotes + cur.VoteResult.OpposeVotes) / float32(cur.VoteResult.TotalVotes) >= float32(cur.CurRule.BoardAttendProb)/100.0 && float32(cur.VoteResult.ApproveVotes + cur.VoteResult.OpposeVotes) / float32(cur.VoteResult.TotalVotes) >= float32(pubAttendRatio)/100.0 &&
float32(cur.VoteResult.ApproveVotes) / float32(cur.VoteResult.ApproveVotes + cur.VoteResult.OpposeVotes) >= float32(cur.CurRule.OpposeProb)/100.0 { float32(cur.VoteResult.ApproveVotes) / float32(cur.VoteResult.ApproveVotes + cur.VoteResult.OpposeVotes) >= float32(pubApproveRatio)/100.0 {
cur.VoteResult.Pass = true cur.VoteResult.Pass = true
cur.PropBoard.RealEndBlockHeight = a.height cur.PropBoard.RealEndBlockHeight = a.height
...@@ -325,8 +330,8 @@ func (a *action) tmintPropBoard(tmintProb *auty.TerminateProposalBoard) (*types. ...@@ -325,8 +330,8 @@ func (a *action) tmintPropBoard(tmintProb *auty.TerminateProposalBoard) (*types.
cur.VoteResult.TotalVotes = int32(account.Balance/ticketPrice) cur.VoteResult.TotalVotes = int32(account.Balance/ticketPrice)
} }
if float32(cur.VoteResult.ApproveVotes + cur.VoteResult.OpposeVotes) / float32(cur.VoteResult.TotalVotes) >= float32(cur.CurRule.BoardAttendProb)/100.0 && if float32(cur.VoteResult.ApproveVotes + cur.VoteResult.OpposeVotes) / float32(cur.VoteResult.TotalVotes) >= float32(pubAttendRatio)/100.0 &&
float32(cur.VoteResult.ApproveVotes) / float32(cur.VoteResult.ApproveVotes + cur.VoteResult.OpposeVotes) >= float32(cur.CurRule.OpposeProb)/100.0 { float32(cur.VoteResult.ApproveVotes) / float32(cur.VoteResult.ApproveVotes + cur.VoteResult.OpposeVotes) >= float32(pubApproveRatio)/100.0 {
cur.VoteResult.Pass = true cur.VoteResult.Pass = true
} else { } else {
cur.VoteResult.Pass = false cur.VoteResult.Pass = false
......
...@@ -12,12 +12,6 @@ import ( ...@@ -12,12 +12,6 @@ import (
"github.com/33cn/chain33/common/address" "github.com/33cn/chain33/common/address"
) )
const (
largeAmount = types.Coin * 100 *10000 // 重大项目金额阈值
publicPeriod = 120960 // 公示一周时间,以区块高度计算
opposeRate int32 = 33 // 反对率以%计
)
func (a *action) propProject(prob *auty.ProposalProject) (*types.Receipt, error) { func (a *action) propProject(prob *auty.ProposalProject) (*types.Receipt, error) {
if err := address.CheckAddress(prob.ToAddr); err != nil { if err := address.CheckAddress(prob.ToAddr); err != nil {
...@@ -58,11 +52,11 @@ func (a *action) propProject(prob *auty.ProposalProject) (*types.Receipt, error) ...@@ -58,11 +52,11 @@ func (a *action) propProject(prob *auty.ProposalProject) (*types.Receipt, error)
return nil, err return nil, err
} }
} else {// 载入系统默认值 } else {// 载入系统默认值
rule.BoardAttendProb = participationRate rule.BoardAttendRatio = boardAttendRatio
rule.BoardPassProb = approveRate rule.BoardApproveRatio = boardApproveRatio
rule.OpposeProb = opposeRate rule.PubOpposeRatio = pubOpposeRatio
rule.ProposalAmount = lockAmount rule.ProposalAmount = proposalAmount
rule.PubAmountThreshold = largeAmount rule.LargeProjectAmount = largeProjectAmount
} }
receipt, err := a.coinsAccount.ExecFrozen(a.fromaddr, a.execaddr, rule.ProposalAmount) receipt, err := a.coinsAccount.ExecFrozen(a.fromaddr, a.execaddr, rule.ProposalAmount)
...@@ -78,7 +72,7 @@ func (a *action) propProject(prob *auty.ProposalProject) (*types.Receipt, error) ...@@ -78,7 +72,7 @@ func (a *action) propProject(prob *auty.ProposalProject) (*types.Receipt, error)
kv = append(kv, receipt.KV...) kv = append(kv, receipt.KV...)
var isPubVote bool var isPubVote bool
if prob.Amount >= rule.PubAmountThreshold { if prob.Amount >= rule.LargeProjectAmount {
isPubVote = true isPubVote = true
} }
cur := &auty.AutonomyProposalProject{ cur := &auty.AutonomyProposalProject{
...@@ -242,8 +236,8 @@ func (a *action) votePropProject(voteProb *auty.VoteProposalProject) (*types.Rec ...@@ -242,8 +236,8 @@ func (a *action) votePropProject(voteProb *auty.VoteProposalProject) (*types.Rec
if cur.BoardVoteRes.TotalVotes != 0 && if cur.BoardVoteRes.TotalVotes != 0 &&
cur.BoardVoteRes.ApproveVotes + cur.BoardVoteRes.OpposeVotes != 0 && cur.BoardVoteRes.ApproveVotes + cur.BoardVoteRes.OpposeVotes != 0 &&
float32(cur.BoardVoteRes.ApproveVotes + cur.BoardVoteRes.OpposeVotes) / float32(cur.BoardVoteRes.TotalVotes) >= float32(cur.CurRule.BoardAttendProb)/100.0 && float32(cur.BoardVoteRes.ApproveVotes + cur.BoardVoteRes.OpposeVotes) / float32(cur.BoardVoteRes.TotalVotes) >= float32(cur.CurRule.BoardAttendRatio)/100.0 &&
float32(cur.BoardVoteRes.ApproveVotes) / float32(cur.BoardVoteRes.ApproveVotes + cur.BoardVoteRes.OpposeVotes) >= float32(cur.CurRule.BoardPassProb)/100.0 { float32(cur.BoardVoteRes.ApproveVotes) / float32(cur.BoardVoteRes.ApproveVotes + cur.BoardVoteRes.OpposeVotes) >= float32(cur.CurRule.BoardApproveRatio)/100.0 {
cur.BoardVoteRes.Pass = true cur.BoardVoteRes.Pass = true
cur.PropProject.RealEndBlockHeight = a.height cur.PropProject.RealEndBlockHeight = a.height
receipt, err := a.coinsAccount.ExecTransferFrozen(cur.Address, autonomyAddr, a.execaddr, cur.CurRule.ProposalAmount) receipt, err := a.coinsAccount.ExecTransferFrozen(cur.Address, autonomyAddr, a.execaddr, cur.CurRule.ProposalAmount)
...@@ -373,7 +367,7 @@ func (a *action) pubVotePropProject(voteProb *auty.PubVoteProposalProject) (*typ ...@@ -373,7 +367,7 @@ func (a *action) pubVotePropProject(voteProb *auty.PubVoteProposalProject) (*typ
var kv []*types.KeyValue var kv []*types.KeyValue
if cur.PubVote.TotalVotes != 0 && if cur.PubVote.TotalVotes != 0 &&
float32(cur.PubVote.OpposeVotes) / float32(cur.PubVote.TotalVotes) >= float32(opposeRate) { float32(cur.PubVote.OpposeVotes) / float32(cur.PubVote.TotalVotes) >= float32(cur.CurRule.PubOpposeRatio) {
cur.PubVote.PubPass = false cur.PubVote.PubPass = false
cur.PropProject.RealEndBlockHeight = a.height cur.PropProject.RealEndBlockHeight = a.height
...@@ -476,8 +470,8 @@ func (a *action) tmintPropProject(tmintProb *auty.TerminateProposalProject) (*ty ...@@ -476,8 +470,8 @@ func (a *action) tmintPropProject(tmintProb *auty.TerminateProposalProject) (*ty
if cur.BoardVoteRes.TotalVotes != 0 && if cur.BoardVoteRes.TotalVotes != 0 &&
cur.BoardVoteRes.ApproveVotes + cur.BoardVoteRes.OpposeVotes != 0 && cur.BoardVoteRes.ApproveVotes + cur.BoardVoteRes.OpposeVotes != 0 &&
float32(cur.BoardVoteRes.ApproveVotes + cur.BoardVoteRes.OpposeVotes) / float32(cur.BoardVoteRes.TotalVotes) >= float32(cur.CurRule.BoardAttendProb)/100.0 && float32(cur.BoardVoteRes.ApproveVotes + cur.BoardVoteRes.OpposeVotes) / float32(cur.BoardVoteRes.TotalVotes) >= float32(cur.CurRule.BoardAttendRatio)/100.0 &&
float32(cur.BoardVoteRes.ApproveVotes) / float32(cur.BoardVoteRes.ApproveVotes + cur.BoardVoteRes.OpposeVotes) >= float32(cur.CurRule.BoardPassProb)/100.0 { float32(cur.BoardVoteRes.ApproveVotes) / float32(cur.BoardVoteRes.ApproveVotes + cur.BoardVoteRes.OpposeVotes) >= float32(cur.CurRule.BoardApproveRatio)/100.0 {
cur.BoardVoteRes.Pass = true cur.BoardVoteRes.Pass = true
} else { } else {
cur.BoardVoteRes.Pass = false cur.BoardVoteRes.Pass = false
...@@ -493,7 +487,7 @@ func (a *action) tmintPropProject(tmintProb *auty.TerminateProposalProject) (*ty ...@@ -493,7 +487,7 @@ func (a *action) tmintPropProject(tmintProb *auty.TerminateProposalProject) (*ty
cur.PubVote.TotalVotes = int32(account.Balance/ticketPrice) cur.PubVote.TotalVotes = int32(account.Balance/ticketPrice)
} }
if cur.PubVote.TotalVotes != 0 && if cur.PubVote.TotalVotes != 0 &&
float32(cur.PubVote.OpposeVotes) / float32(cur.PubVote.TotalVotes) >= float32(opposeRate) { float32(cur.PubVote.OpposeVotes) / float32(cur.PubVote.TotalVotes) >= float32(cur.CurRule.PubOpposeRatio) {
cur.PubVote.PubPass = false cur.PubVote.PubPass = false
} }
} }
......
...@@ -11,16 +11,12 @@ import ( ...@@ -11,16 +11,12 @@ import (
) )
const (
ruleAttendRate = 50 // 提案规则修改参与率
ruleApproveRate = 50 // 提案规则修改赞成率
)
func (a *action) propRule(prob *auty.ProposalRule) (*types.Receipt, error) { func (a *action) propRule(prob *auty.ProposalRule) (*types.Receipt, error) {
//如果全小于等于0,则说明该提案规则参数不正确 //如果全小于等于0,则说明该提案规则参数不正确
if prob.RuleCfg == nil || prob.RuleCfg.BoardAttendProb <= 0 && prob.RuleCfg.BoardPassProb <= 0 && if prob.RuleCfg == nil || prob.RuleCfg.BoardAttendRatio <= 0 && prob.RuleCfg.BoardApproveRatio <= 0 &&
prob.RuleCfg.OpposeProb <= 0 && prob.RuleCfg.ProposalAmount <= 0 && prob.RuleCfg.PubAmountThreshold <= 0 { prob.RuleCfg.PubOpposeRatio <= 0 && prob.RuleCfg.ProposalAmount <= 0 && prob.RuleCfg.LargeProjectAmount <= 0 {
return nil, types.ErrInvalidParam return nil, types.ErrInvalidParam
} }
...@@ -38,28 +34,31 @@ func (a *action) propRule(prob *auty.ProposalRule) (*types.Receipt, error) { ...@@ -38,28 +34,31 @@ func (a *action) propRule(prob *auty.ProposalRule) (*types.Receipt, error) {
return nil, err return nil, err
} }
} else {// 载入系统默认值 } else {// 载入系统默认值
rule.BoardAttendProb = participationRate rule.BoardAttendRatio = boardAttendRatio
rule.BoardPassProb = approveRate rule.BoardApproveRatio = boardApproveRatio
rule.OpposeProb = opposeRate rule.PubOpposeRatio = pubOpposeRatio
rule.ProposalAmount = lockAmount rule.ProposalAmount = proposalAmount
rule.PubAmountThreshold = largeAmount rule.LargeProjectAmount = largeProjectAmount
}
if prob.RuleCfg.BoardAttendRatio > 0 {
rule.BoardAttendRatio = prob.RuleCfg.BoardAttendRatio
} }
if prob.RuleCfg.BoardAttendProb > 0 { if prob.RuleCfg.BoardApproveRatio > 0 {
rule.BoardAttendProb = prob.RuleCfg.BoardAttendProb rule.BoardApproveRatio = prob.RuleCfg.BoardApproveRatio
} }
if prob.RuleCfg.BoardPassProb > 0 { if prob.RuleCfg.PubOpposeRatio > 0 {
rule.BoardPassProb = prob.RuleCfg.BoardPassProb rule.BoardApproveRatio = prob.RuleCfg.PubOpposeRatio
} }
if prob.RuleCfg.ProposalAmount > 0{ if prob.RuleCfg.ProposalAmount > 0{
rule.ProposalAmount = prob.RuleCfg.ProposalAmount rule.ProposalAmount = prob.RuleCfg.ProposalAmount
} }
if prob.RuleCfg.PubAmountThreshold > 0 { if prob.RuleCfg.LargeProjectAmount > 0 {
rule.PubAmountThreshold = prob.RuleCfg.PubAmountThreshold rule.LargeProjectAmount = prob.RuleCfg.LargeProjectAmount
} }
receipt, err := a.coinsAccount.ExecFrozen(a.fromaddr, a.execaddr, lockAmount) receipt, err := a.coinsAccount.ExecFrozen(a.fromaddr, a.execaddr, rule.ProposalAmount)
if err != nil { if err != nil {
alog.Error("propRule ", "addr", a.fromaddr, "execaddr", a.execaddr, "ExecFrozen amount", lockAmount) alog.Error("propRule ", "addr", a.fromaddr, "execaddr", a.execaddr, "ExecFrozen amount", rule.ProposalAmount)
return nil, err return nil, err
} }
...@@ -132,9 +131,9 @@ func (a *action) rvkPropRule(rvkProb *auty.RevokeProposalRule) (*types.Receipt, ...@@ -132,9 +131,9 @@ func (a *action) rvkPropRule(rvkProb *auty.RevokeProposalRule) (*types.Receipt,
var logs []*types.ReceiptLog var logs []*types.ReceiptLog
var kv []*types.KeyValue var kv []*types.KeyValue
receipt, err := a.coinsAccount.ExecActive(a.fromaddr, a.execaddr, lockAmount) receipt, err := a.coinsAccount.ExecActive(a.fromaddr, a.execaddr, cur.Rule.ProposalAmount)
if err != nil { if err != nil {
alog.Error("rvkPropRule ", "addr", a.fromaddr, "execaddr", a.execaddr, "ExecActive amount", lockAmount, "err", err) alog.Error("rvkPropRule ", "addr", a.fromaddr, "execaddr", a.execaddr, "ExecActive amount", cur.Rule.ProposalAmount, "err", err)
return nil, err return nil, err
} }
logs = append(logs, receipt.Logs...) logs = append(logs, receipt.Logs...)
...@@ -232,8 +231,8 @@ func (a *action) votePropRule(voteProb *auty.VoteProposalRule) (*types.Receipt, ...@@ -232,8 +231,8 @@ func (a *action) votePropRule(voteProb *auty.VoteProposalRule) (*types.Receipt,
if cur.VoteResult.TotalVotes != 0 && if cur.VoteResult.TotalVotes != 0 &&
cur.VoteResult.ApproveVotes + cur.VoteResult.OpposeVotes != 0 && cur.VoteResult.ApproveVotes + cur.VoteResult.OpposeVotes != 0 &&
float32(cur.VoteResult.ApproveVotes + cur.VoteResult.OpposeVotes) / float32(cur.VoteResult.TotalVotes) >= float32(ruleAttendRate)/100.0 && float32(cur.VoteResult.ApproveVotes + cur.VoteResult.OpposeVotes) / float32(cur.VoteResult.TotalVotes) >= float32(pubAttendRatio)/100.0 &&
float32(cur.VoteResult.ApproveVotes) / float32(cur.VoteResult.ApproveVotes + cur.VoteResult.OpposeVotes) >= float32(ruleApproveRate)/100.0 { float32(cur.VoteResult.ApproveVotes) / float32(cur.VoteResult.ApproveVotes + cur.VoteResult.OpposeVotes) >= float32(pubApproveRatio)/100.0 {
cur.VoteResult.Pass = true cur.VoteResult.Pass = true
cur.PropRule.RealEndBlockHeight = a.height cur.PropRule.RealEndBlockHeight = a.height
...@@ -315,8 +314,8 @@ func (a *action) tmintPropRule(tmintProb *auty.TerminateProposalRule) (*types.Re ...@@ -315,8 +314,8 @@ func (a *action) tmintPropRule(tmintProb *auty.TerminateProposalRule) (*types.Re
cur.VoteResult.TotalVotes = int32(account.Balance/ticketPrice) cur.VoteResult.TotalVotes = int32(account.Balance/ticketPrice)
} }
if float32(cur.VoteResult.ApproveVotes + cur.VoteResult.OpposeVotes) / float32(cur.VoteResult.TotalVotes) >= float32(ruleAttendRate)/100.0 && if float32(cur.VoteResult.ApproveVotes + cur.VoteResult.OpposeVotes) / float32(cur.VoteResult.TotalVotes) >= float32(pubAttendRatio)/100.0 &&
float32(cur.VoteResult.ApproveVotes) / float32(cur.VoteResult.ApproveVotes + cur.VoteResult.OpposeVotes) >= float32(ruleApproveRate)/100.0 { float32(cur.VoteResult.ApproveVotes) / float32(cur.VoteResult.ApproveVotes + cur.VoteResult.OpposeVotes) >= float32(pubApproveRatio)/100.0 {
cur.VoteResult.Pass = true cur.VoteResult.Pass = true
} else { } else {
cur.VoteResult.Pass = false cur.VoteResult.Pass = false
......
...@@ -33,14 +33,14 @@ message VotesRecord { ...@@ -33,14 +33,14 @@ message VotesRecord {
} }
message RuleConfig { message RuleConfig {
// 参与率,以%为单位,只保留整数部分 // 董事会成员参与率,以%为单位,只保留整数部分
int32 boardAttendProb = 1; int32 boardAttendRatio = 1;
// 通过 // 董事会成员赞成
int32 boardPassProb = 2; int32 boardApproveRatio = 2;
// 否决率 // 全体持票人否决率
int32 opposeProb = 3; int32 pubOpposeRatio = 3;
// 提案金额 // 提案金额
int64 proposalAmount = 4; int64 proposalAmount = 4;
// 公示金额阈值 // 重大项目公示金额阈值
int64 pubAmountThreshold = 5; int64 largeProjectAmount = 5;
} }
\ No newline at end of file
...@@ -117,16 +117,16 @@ func (m *VotesRecord) GetAddress() []string { ...@@ -117,16 +117,16 @@ func (m *VotesRecord) GetAddress() []string {
} }
type RuleConfig struct { type RuleConfig struct {
// 参与率,以%为单位,只保留整数部分 // 董事会成员参与率,以%为单位,只保留整数部分
BoardAttendProb int32 `protobuf:"varint,1,opt,name=boardAttendProb" json:"boardAttendProb,omitempty"` BoardAttendRatio int32 `protobuf:"varint,1,opt,name=boardAttendRatio" json:"boardAttendRatio,omitempty"`
// 通过 // 董事会成员赞成
BoardPassProb int32 `protobuf:"varint,2,opt,name=boardPassProb" json:"boardPassProb,omitempty"` BoardApproveRatio int32 `protobuf:"varint,2,opt,name=boardApproveRatio" json:"boardApproveRatio,omitempty"`
// 否决率 // 全体持票人否决率
OpposeProb int32 `protobuf:"varint,3,opt,name=opposeProb" json:"opposeProb,omitempty"` PubOpposeRatio int32 `protobuf:"varint,3,opt,name=pubOpposeRatio" json:"pubOpposeRatio,omitempty"`
// 提案金额 // 提案金额
ProposalAmount int64 `protobuf:"varint,4,opt,name=proposalAmount" json:"proposalAmount,omitempty"` ProposalAmount int64 `protobuf:"varint,4,opt,name=proposalAmount" json:"proposalAmount,omitempty"`
// 公示金额阈值 // 重大项目公示金额阈值
PubAmountThreshold int64 `protobuf:"varint,5,opt,name=pubAmountThreshold" json:"pubAmountThreshold,omitempty"` LargeProjectAmount int64 `protobuf:"varint,5,opt,name=largeProjectAmount" json:"largeProjectAmount,omitempty"`
} }
func (m *RuleConfig) Reset() { *m = RuleConfig{} } func (m *RuleConfig) Reset() { *m = RuleConfig{} }
...@@ -134,23 +134,23 @@ func (m *RuleConfig) String() string { return proto.CompactTextString ...@@ -134,23 +134,23 @@ func (m *RuleConfig) String() string { return proto.CompactTextString
func (*RuleConfig) ProtoMessage() {} func (*RuleConfig) ProtoMessage() {}
func (*RuleConfig) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{3} } func (*RuleConfig) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{3} }
func (m *RuleConfig) GetBoardAttendProb() int32 { func (m *RuleConfig) GetBoardAttendRatio() int32 {
if m != nil { if m != nil {
return m.BoardAttendProb return m.BoardAttendRatio
} }
return 0 return 0
} }
func (m *RuleConfig) GetBoardPassProb() int32 { func (m *RuleConfig) GetBoardApproveRatio() int32 {
if m != nil { if m != nil {
return m.BoardPassProb return m.BoardApproveRatio
} }
return 0 return 0
} }
func (m *RuleConfig) GetOpposeProb() int32 { func (m *RuleConfig) GetPubOpposeRatio() int32 {
if m != nil { if m != nil {
return m.OpposeProb return m.PubOpposeRatio
} }
return 0 return 0
} }
...@@ -162,9 +162,9 @@ func (m *RuleConfig) GetProposalAmount() int64 { ...@@ -162,9 +162,9 @@ func (m *RuleConfig) GetProposalAmount() int64 {
return 0 return 0
} }
func (m *RuleConfig) GetPubAmountThreshold() int64 { func (m *RuleConfig) GetLargeProjectAmount() int64 {
if m != nil { if m != nil {
return m.PubAmountThreshold return m.LargeProjectAmount
} }
return 0 return 0
} }
...@@ -179,24 +179,24 @@ func init() { ...@@ -179,24 +179,24 @@ func init() {
func init() { proto.RegisterFile("lcommon.proto", fileDescriptor2) } func init() { proto.RegisterFile("lcommon.proto", fileDescriptor2) }
var fileDescriptor2 = []byte{ var fileDescriptor2 = []byte{
// 297 bytes of a gzipped FileDescriptorProto // 299 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0xcb, 0x4a, 0x33, 0x41, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0xcd, 0x4a, 0xc3, 0x40,
0x10, 0x85, 0x99, 0x5c, 0xfe, 0x3f, 0xa9, 0x18, 0x85, 0x5a, 0xcd, 0x42, 0x24, 0x0c, 0xa2, 0xb3, 0x10, 0x80, 0x49, 0x7f, 0xb4, 0x9d, 0xaa, 0xe8, 0x9c, 0x7a, 0x10, 0x29, 0x39, 0x68, 0x11, 0xe9,
0xca, 0xc6, 0x27, 0x08, 0xbe, 0x40, 0x68, 0xc4, 0xfd, 0x74, 0xba, 0x35, 0x81, 0xce, 0x54, 0xd1, 0xc5, 0x27, 0x28, 0x3e, 0x80, 0x65, 0x0f, 0xde, 0x37, 0xc9, 0x5a, 0x22, 0xdb, 0xcc, 0xb2, 0x3b,
0x17, 0x21, 0x2f, 0xe0, 0x13, 0xfa, 0x40, 0xd2, 0x35, 0x09, 0xb9, 0x28, 0xb8, 0x9b, 0xf3, 0xcd, 0x2b, 0xf4, 0x05, 0x7c, 0x54, 0x9f, 0x43, 0x32, 0xdb, 0xd2, 0xda, 0x08, 0xde, 0x32, 0xdf, 0x7e,
0x07, 0x73, 0x4e, 0x31, 0x30, 0x75, 0x2b, 0xda, 0x6e, 0xa9, 0x9d, 0xb3, 0xa7, 0x48, 0x38, 0x8c, 0x87, 0x6f, 0x86, 0xc0, 0xa5, 0x2d, 0x69, 0xb3, 0xa1, 0x66, 0xe1, 0x3c, 0x31, 0xe1, 0x90, 0xb7,
0x3b, 0xb6, 0xa1, 0xfa, 0x2c, 0x00, 0x5e, 0x29, 0x5a, 0x65, 0x43, 0x72, 0x11, 0xef, 0x00, 0x22, 0xce, 0x84, 0xfc, 0x2b, 0x03, 0x78, 0x23, 0x36, 0xca, 0x84, 0x68, 0x19, 0xef, 0x00, 0x98, 0x58,
0xc5, 0xc6, 0x65, 0x14, 0xca, 0x62, 0x56, 0xd4, 0x43, 0x75, 0x42, 0xb0, 0x82, 0xab, 0x86, 0xd9, 0xdb, 0x16, 0x85, 0x69, 0x36, 0xcb, 0xe6, 0x43, 0x75, 0x44, 0x30, 0x87, 0x0b, 0xed, 0x9c, 0xa7,
0xd3, 0x87, 0xed, 0x8c, 0x9e, 0x18, 0x67, 0x0c, 0x67, 0x30, 0x21, 0x66, 0x0a, 0x7b, 0xa5, 0x2f, 0x4f, 0x93, 0x8c, 0x9e, 0x18, 0xbf, 0x18, 0xce, 0x60, 0x42, 0xce, 0x51, 0xd8, 0x29, 0x7d, 0x51,
0xca, 0x29, 0x42, 0x84, 0x01, 0x37, 0x21, 0x94, 0x83, 0x59, 0x51, 0x8f, 0x94, 0x3c, 0x4b, 0x91, 0x8e, 0x11, 0x22, 0x0c, 0x9c, 0x0e, 0x61, 0x3a, 0x98, 0x65, 0xf3, 0x91, 0x92, 0x6f, 0x09, 0x59,
0x65, 0xd2, 0x6e, 0xb3, 0xca, 0x0e, 0xde, 0xc2, 0x98, 0x25, 0x6d, 0xe2, 0x4e, 0x7a, 0x8c, 0xd4, 0xc5, 0xc2, 0xd6, 0x65, 0xeb, 0xe0, 0x2d, 0x8c, 0x9d, 0x4c, 0x35, 0x6f, 0xa5, 0x63, 0xa4, 0x0e,
0x11, 0x5c, 0xd4, 0xec, 0xfd, 0xa8, 0xf9, 0x77, 0x85, 0x12, 0xfe, 0x73, 0xd2, 0xcb, 0x63, 0x8b, 0xe0, 0x24, 0xb3, 0xd7, 0xc9, 0xfc, 0x3f, 0x61, 0x0a, 0xe7, 0x2e, 0x16, 0xab, 0x43, 0xc5, 0x7e,
0x43, 0xac, 0x1e, 0x61, 0x22, 0x8a, 0xb2, 0x2b, 0xf2, 0x26, 0x8b, 0x8d, 0x31, 0xde, 0x86, 0x7c, 0xcc, 0x1f, 0x60, 0x22, 0x8a, 0x32, 0x25, 0xf9, 0xaa, 0x15, 0x75, 0x55, 0x79, 0x13, 0xda, 0x73,
0x8e, 0x7e, 0x3d, 0x56, 0x87, 0x58, 0x7d, 0x15, 0x00, 0x2a, 0x39, 0xfb, 0x4c, 0xed, 0xdb, 0xe6, 0xf4, 0xe7, 0x63, 0xb5, 0x1f, 0xf3, 0xef, 0x0c, 0x40, 0x45, 0x6b, 0x5e, 0xa8, 0x79, 0xaf, 0xd7,
0x1d, 0x6b, 0xb8, 0xd1, 0xd4, 0x78, 0xb3, 0x88, 0xd1, 0xb6, 0x66, 0xe9, 0x49, 0xef, 0xef, 0x77, 0xf8, 0x08, 0xd7, 0x05, 0x69, 0x5f, 0x2d, 0x99, 0x4d, 0x53, 0x29, 0xcd, 0x35, 0xed, 0x0e, 0xd8,
0x89, 0xf1, 0x1e, 0xa6, 0x82, 0xf2, 0xe7, 0xc4, 0xeb, 0x06, 0x9c, 0xc3, 0xbc, 0xb1, 0x2b, 0x2c, 0xe1, 0xf8, 0x04, 0x37, 0x89, 0xa5, 0xbb, 0x25, 0x39, 0xad, 0xd1, 0x7d, 0xc0, 0x7b, 0xb8, 0x72,
0x4a, 0x37, 0xe1, 0x84, 0xe0, 0x03, 0x5c, 0xb3, 0x27, 0xa6, 0xd0, 0xb8, 0xc5, 0x96, 0x52, 0x1b, 0xb1, 0x78, 0x95, 0xfa, 0xa4, 0xa6, 0x85, 0x4e, 0xa8, 0x78, 0x9e, 0x1c, 0x05, 0x6d, 0x97, 0x1b,
0x65, 0x48, 0x5f, 0x5d, 0x50, 0x9c, 0x03, 0x72, 0xd2, 0x5d, 0x78, 0x59, 0x7b, 0x1b, 0xd6, 0xe4, 0x8a, 0x0d, 0xcb, 0x6a, 0x7d, 0x75, 0x42, 0x71, 0x01, 0x68, 0xb5, 0x5f, 0x9b, 0x95, 0xa7, 0x0f,
0x4c, 0x39, 0x14, 0xf7, 0x97, 0x37, 0xfa, 0x9f, 0xfc, 0x1f, 0x4f, 0xdf, 0x01, 0x00, 0x00, 0xff, 0x53, 0xf2, 0xce, 0x1d, 0x8a, 0xfb, 0xc7, 0x4b, 0x71, 0x26, 0x7f, 0xcc, 0xf3, 0x4f, 0x00, 0x00,
0xff, 0x8a, 0x95, 0x5e, 0xd6, 0x30, 0x02, 0x00, 0x00, 0x00, 0xff, 0xff, 0x39, 0xcc, 0x0c, 0x6d, 0x42, 0x02, 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