Commit 80c2cd69 authored by liuyuhang's avatar liuyuhang

modify board project ticket fund

parent 093e15cd
...@@ -21,6 +21,7 @@ var ( ...@@ -21,6 +21,7 @@ var (
alog = log.New("module", "execs.autonomy") alog = log.New("module", "execs.autonomy")
driverName = auty.AutonomyX driverName = auty.AutonomyX
autonomyFundAddr = address.ExecAddress("autonomyfund") autonomyFundAddr = address.ExecAddress("autonomyfund")
autonomyAddr = address.ExecAddress("autonomy")
cfg subConfig cfg subConfig
) )
......
...@@ -86,7 +86,8 @@ func (a *action) propBoard(prob *auty.ProposalBoard) (*types.Receipt, error) { ...@@ -86,7 +86,8 @@ func (a *action) propBoard(prob *auty.ProposalBoard) (*types.Receipt, error) {
return nil, err return nil, err
} }
receipt, err := a.coinsAccount.ExecFrozen(a.fromaddr, a.execaddr, rule.ProposalAmount) //receipt, err := a.coinsAccount.ExecFrozen(a.fromaddr, a.execaddr, rule.ProposalAmount)
receipt, err := a.coinsAccount.Transfer(a.fromaddr, a.execaddr, rule.ProposalAmount)
if err != nil { if err != nil {
alog.Error("propBoard ", "addr", a.fromaddr, "execaddr", a.execaddr, "ExecFrozen amount", rule.ProposalAmount) alog.Error("propBoard ", "addr", a.fromaddr, "execaddr", a.execaddr, "ExecFrozen amount", rule.ProposalAmount)
return nil, err return nil, err
...@@ -152,7 +153,7 @@ func (a *action) rvkPropBoard(rvkProb *auty.RevokeProposalBoard) (*types.Receipt ...@@ -152,7 +153,7 @@ func (a *action) rvkPropBoard(rvkProb *auty.RevokeProposalBoard) (*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, cur.CurRule.ProposalAmount) receipt, err := a.coinsAccount.TransferWithdraw(a.fromaddr, a.execaddr, cur.CurRule.ProposalAmount)
if err != nil { if err != nil {
alog.Error("rvkPropBoard ", "addr", a.fromaddr, "execaddr", a.execaddr, "ExecActive amount", cur.CurRule.ProposalAmount, "err", err) alog.Error("rvkPropBoard ", "addr", a.fromaddr, "execaddr", a.execaddr, "ExecActive amount", cur.CurRule.ProposalAmount, "err", err)
return nil, err return nil, err
...@@ -255,16 +256,16 @@ func (a *action) votePropBoard(voteProb *auty.VoteProposalBoard) (*types.Receipt ...@@ -255,16 +256,16 @@ func (a *action) votePropBoard(voteProb *auty.VoteProposalBoard) (*types.Receipt
var logs []*types.ReceiptLog var logs []*types.ReceiptLog
var kv []*types.KeyValue var kv []*types.KeyValue
// 首次进入投票期,即将提案金转入自治系统地址 //// 首次进入投票期,即将提案金转入自治系统地址
if cur.Status == auty.AutonomyStatusProposalBoard { //if cur.Status == auty.AutonomyStatusProposalBoard {
receipt, err := a.coinsAccount.ExecTransferFrozen(cur.Address, autonomyFundAddr, a.execaddr, cur.CurRule.ProposalAmount) // receipt, err := a.coinsAccount.ExecTransferFrozen(cur.Address, autonomyFundAddr, a.execaddr, cur.CurRule.ProposalAmount)
if err != nil { // if err != nil {
alog.Error("votePropBoard ", "addr", cur.Address, "execaddr", a.execaddr, "ExecTransferFrozen amount fail", err) // alog.Error("votePropBoard ", "addr", cur.Address, "execaddr", a.execaddr, "ExecTransferFrozen amount fail", err)
return nil, err // return nil, err
} // }
logs = append(logs, receipt.Logs...) // logs = append(logs, receipt.Logs...)
kv = append(kv, receipt.KV...) // kv = append(kv, receipt.KV...)
} //}
if cur.VoteResult.TotalVotes != 0 && if cur.VoteResult.TotalVotes != 0 &&
cur.VoteResult.ApproveVotes+cur.VoteResult.OpposeVotes != 0 && cur.VoteResult.ApproveVotes+cur.VoteResult.OpposeVotes != 0 &&
...@@ -349,16 +350,16 @@ func (a *action) tmintPropBoard(tmintProb *auty.TerminateProposalBoard) (*types. ...@@ -349,16 +350,16 @@ func (a *action) tmintPropBoard(tmintProb *auty.TerminateProposalBoard) (*types.
var logs []*types.ReceiptLog var logs []*types.ReceiptLog
var kv []*types.KeyValue var kv []*types.KeyValue
// 未进行投票情况下,符合提案关闭的也需要扣除提案费用 //// 未进行投票情况下,符合提案关闭的也需要扣除提案费用
if cur.Status == auty.AutonomyStatusProposalBoard { //if cur.Status == auty.AutonomyStatusProposalBoard {
receipt, err := a.coinsAccount.ExecTransferFrozen(cur.Address, autonomyFundAddr, a.execaddr, cur.CurRule.ProposalAmount) // receipt, err := a.coinsAccount.ExecTransferFrozen(cur.Address, autonomyFundAddr, a.execaddr, cur.CurRule.ProposalAmount)
if err != nil { // if err != nil {
alog.Error("votePropBoard ", "addr", a.fromaddr, "execaddr", a.execaddr, "ExecTransferFrozen amount fail", err) // alog.Error("votePropBoard ", "addr", a.fromaddr, "execaddr", a.execaddr, "ExecTransferFrozen amount fail", err)
return nil, err // return nil, err
} // }
logs = append(logs, receipt.Logs...) // logs = append(logs, receipt.Logs...)
kv = append(kv, receipt.KV...) // kv = append(kv, receipt.KV...)
} //}
cur.Status = auty.AutonomyStatusTmintPropBoard cur.Status = auty.AutonomyStatusTmintPropBoard
......
...@@ -251,8 +251,8 @@ func testPropBoard(t *testing.T, env *ExecEnv, exec drivers.Driver, stateDB dbm. ...@@ -251,8 +251,8 @@ func testPropBoard(t *testing.T, env *ExecEnv, exec drivers.Driver, stateDB dbm.
// check // check
accCoin := account.NewCoinsAccount() accCoin := account.NewCoinsAccount()
accCoin.SetDB(stateDB) accCoin.SetDB(stateDB)
account := accCoin.LoadExecAccount(AddrA, address.ExecAddress(auty.AutonomyX)) account := accCoin.LoadAccount(address.ExecAddress(auty.AutonomyX))
assert.Equal(t, proposalAmount, account.Frozen) assert.Equal(t, proposalAmount, account.Balance)
} }
func propBoardTx(parm *auty.ProposalBoard) (*types.Transaction, error) { func propBoardTx(parm *auty.ProposalBoard) (*types.Transaction, error) {
...@@ -301,8 +301,8 @@ func revokeProposalBoard(t *testing.T, env *ExecEnv, exec drivers.Driver, stateD ...@@ -301,8 +301,8 @@ func revokeProposalBoard(t *testing.T, env *ExecEnv, exec drivers.Driver, stateD
// check // check
accCoin := account.NewCoinsAccount() accCoin := account.NewCoinsAccount()
accCoin.SetDB(stateDB) accCoin.SetDB(stateDB)
account := accCoin.LoadExecAccount(AddrA, address.ExecAddress(auty.AutonomyX)) account := accCoin.LoadAccount(address.ExecAddress(auty.AutonomyX))
assert.Equal(t, int64(0), account.Frozen) assert.Equal(t, int64(0), account.Balance)
} }
func revokeProposalBoardTx(parm *auty.RevokeProposalBoard) (*types.Transaction, error) { func revokeProposalBoardTx(parm *auty.RevokeProposalBoard) (*types.Transaction, error) {
...@@ -407,9 +407,9 @@ func voteProposalBoard(t *testing.T, env *ExecEnv, exec drivers.Driver, stateDB ...@@ -407,9 +407,9 @@ func voteProposalBoard(t *testing.T, env *ExecEnv, exec drivers.Driver, stateDB
// balance // balance
accCoin := account.NewCoinsAccount() accCoin := account.NewCoinsAccount()
accCoin.SetDB(stateDB) accCoin.SetDB(stateDB)
account := accCoin.LoadExecAccount(AddrA, address.ExecAddress(auty.AutonomyX)) account := accCoin.LoadAccount(AddrA)
assert.Equal(t, int64(0), account.Frozen) assert.Equal(t, total - proposalAmount, account.Balance)
account = accCoin.LoadExecAccount(autonomyFundAddr, address.ExecAddress(auty.AutonomyX)) account = accCoin.LoadAccount(address.ExecAddress(auty.AutonomyX))
assert.Equal(t, proposalAmount, account.Balance) assert.Equal(t, proposalAmount, account.Balance)
// status // status
value, err := stateDB.Get(propBoardID(proposalID)) value, err := stateDB.Get(propBoardID(proposalID))
...@@ -484,8 +484,10 @@ func terminateProposalBoard(t *testing.T, env *ExecEnv, exec drivers.Driver, sta ...@@ -484,8 +484,10 @@ func terminateProposalBoard(t *testing.T, env *ExecEnv, exec drivers.Driver, sta
// check // check
accCoin := account.NewCoinsAccount() accCoin := account.NewCoinsAccount()
accCoin.SetDB(stateDB) accCoin.SetDB(stateDB)
account := accCoin.LoadExecAccount(AddrA, address.ExecAddress(auty.AutonomyX)) account := accCoin.LoadAccount(AddrA)
assert.Equal(t, int64(0), account.Frozen) assert.Equal(t, total - proposalAmount, account.Balance)
account = accCoin.LoadAccount(address.ExecAddress(auty.AutonomyX))
assert.Equal(t, proposalAmount, account.Balance)
} }
func terminateProposalBoardTx(parm *auty.TerminateProposalBoard) (*types.Transaction, error) { func terminateProposalBoardTx(parm *auty.TerminateProposalBoard) (*types.Transaction, error) {
......
...@@ -238,7 +238,7 @@ func (a *action) tmintPropChange(tmintProb *auty.TerminateProposalChange) (*type ...@@ -238,7 +238,7 @@ func (a *action) tmintPropChange(tmintProb *auty.TerminateProposalChange) (*type
} }
end := cur.GetPropChange().EndBlockHeight end := cur.GetPropChange().EndBlockHeight
if a.height < end && !cur.VoteResult.Pass { if a.height <= end && !cur.VoteResult.Pass {
err := auty.ErrTerminatePeriod err := auty.ErrTerminatePeriod
alog.Error("tmintPropChange ", "addr", a.fromaddr, "status", cur.Status, "height", a.height, alog.Error("tmintPropChange ", "addr", a.fromaddr, "status", cur.Status, "height", a.height,
"in vote period can not terminate", tmintProb.ProposalID, "err", err) "in vote period can not terminate", tmintProb.ProposalID, "err", err)
......
...@@ -56,12 +56,20 @@ func (a *action) propProject(prob *auty.ProposalProject) (*types.Receipt, error) ...@@ -56,12 +56,20 @@ func (a *action) propProject(prob *auty.ProposalProject) (*types.Receipt, error)
alog.Error("propProject ", "addr", a.fromaddr, "execaddr", a.execaddr, "getActiveRule failed", err) alog.Error("propProject ", "addr", a.fromaddr, "execaddr", a.execaddr, "getActiveRule failed", err)
return nil, err return nil, err
} }
// 判断基金中是否有足够资金
account := a.coinsAccount.LoadAccount(a.execaddr)
if account == nil || account.Balance < prob.Amount {
err = auty.ErrNotEnoughFund
alog.Error("propProject ", "addr", a.fromaddr, "execaddr", a.execaddr, "the find have enough amount ", err)
return nil, err
}
var logs []*types.ReceiptLog var logs []*types.ReceiptLog
var kv []*types.KeyValue var kv []*types.KeyValue
// 冻结提案金 // 冻结提案金
receipt, err := a.coinsAccount.ExecFrozen(a.fromaddr, a.execaddr, rule.ProposalAmount) receipt, err := a.coinsAccount.Transfer(a.fromaddr, a.execaddr, rule.ProposalAmount)
if err != nil { if err != nil {
alog.Error("propProject ", "addr", a.fromaddr, "execaddr", a.execaddr, "ExecFrozen proposal amount", rule.ProposalAmount, "error", err) alog.Error("propProject ", "addr", a.fromaddr, "execaddr", a.execaddr, "ExecFrozen proposal amount", rule.ProposalAmount, "error", err)
return nil, err return nil, err
...@@ -69,14 +77,14 @@ func (a *action) propProject(prob *auty.ProposalProject) (*types.Receipt, error) ...@@ -69,14 +77,14 @@ func (a *action) propProject(prob *auty.ProposalProject) (*types.Receipt, error)
logs = append(logs, receipt.Logs...) logs = append(logs, receipt.Logs...)
kv = append(kv, receipt.KV...) kv = append(kv, receipt.KV...)
// 冻结项目金 //// 冻结项目金
receiptPrj, err := a.coinsAccount.ExecFrozen(autonomyFundAddr, a.execaddr, prob.Amount) //receiptPrj, err := a.coinsAccount.ExecFrozen(autonomyFundAddr, a.execaddr, prob.Amount)
if err != nil { //if err != nil {
alog.Error("propProject ", "addr", a.fromaddr, "execaddr", a.execaddr, "ExecFrozen project amount", prob.Amount, "error", err) // alog.Error("propProject ", "addr", a.fromaddr, "execaddr", a.execaddr, "ExecFrozen project amount", prob.Amount, "error", err)
return nil, err // return nil, err
} //}
logs = append(logs, receiptPrj.Logs...) //logs = append(logs, receiptPrj.Logs...)
kv = append(kv, receiptPrj.KV...) //kv = append(kv, receiptPrj.KV...)
var isPubVote bool var isPubVote bool
if prob.Amount >= rule.LargeProjectAmount { if prob.Amount >= rule.LargeProjectAmount {
...@@ -140,7 +148,7 @@ func (a *action) rvkPropProject(rvkProb *auty.RevokeProposalProject) (*types.Rec ...@@ -140,7 +148,7 @@ func (a *action) rvkPropProject(rvkProb *auty.RevokeProposalProject) (*types.Rec
var kv []*types.KeyValue var kv []*types.KeyValue
// 解冻提案金 // 解冻提案金
receipt, err := a.coinsAccount.ExecActive(a.fromaddr, a.execaddr, cur.CurRule.ProposalAmount) receipt, err := a.coinsAccount.TransferWithdraw(a.fromaddr, a.execaddr, cur.CurRule.ProposalAmount)
if err != nil { if err != nil {
alog.Error("rvkPropProject ", "addr", a.fromaddr, "execaddr", a.execaddr, "ExecActive amount", cur.CurRule.ProposalAmount, "err", err) alog.Error("rvkPropProject ", "addr", a.fromaddr, "execaddr", a.execaddr, "ExecActive amount", cur.CurRule.ProposalAmount, "err", err)
return nil, err return nil, err
...@@ -148,14 +156,14 @@ func (a *action) rvkPropProject(rvkProb *auty.RevokeProposalProject) (*types.Rec ...@@ -148,14 +156,14 @@ func (a *action) rvkPropProject(rvkProb *auty.RevokeProposalProject) (*types.Rec
logs = append(logs, receipt.Logs...) logs = append(logs, receipt.Logs...)
kv = append(kv, receipt.KV...) kv = append(kv, receipt.KV...)
// 解冻项目金 //// 解冻项目金
receiptPrj, err := a.coinsAccount.ExecActive(autonomyFundAddr, a.execaddr, cur.PropProject.Amount) //receiptPrj, err := a.coinsAccount.ExecActive(autonomyFundAddr, a.execaddr, cur.PropProject.Amount)
if err != nil { //if err != nil {
alog.Error("rvkPropProject ", "addr", a.fromaddr, "execaddr", a.execaddr, "ExecActive project amount", cur.PropProject.Amount, "error", err) // alog.Error("rvkPropProject ", "addr", a.fromaddr, "execaddr", a.execaddr, "ExecActive project amount", cur.PropProject.Amount, "error", err)
return nil, err // return nil, err
} //}
logs = append(logs, receiptPrj.Logs...) //logs = append(logs, receiptPrj.Logs...)
kv = append(kv, receiptPrj.KV...) //kv = append(kv, receiptPrj.KV...)
cur.Status = auty.AutonomyStatusRvkPropProject cur.Status = auty.AutonomyStatusRvkPropProject
...@@ -231,16 +239,16 @@ func (a *action) votePropProject(voteProb *auty.VoteProposalProject) (*types.Rec ...@@ -231,16 +239,16 @@ func (a *action) votePropProject(voteProb *auty.VoteProposalProject) (*types.Rec
var logs []*types.ReceiptLog var logs []*types.ReceiptLog
var kv []*types.KeyValue var kv []*types.KeyValue
// 首次进入投票期,即将提案金转入自治系统地址 //// 首次进入投票期,即将提案金转入自治系统地址
if cur.Status == auty.AutonomyStatusProposalProject { //if cur.Status == auty.AutonomyStatusProposalProject {
receipt, err := a.coinsAccount.ExecTransferFrozen(cur.Address, autonomyFundAddr, a.execaddr, cur.CurRule.ProposalAmount) // receipt, err := a.coinsAccount.ExecTransferFrozen(cur.Address, autonomyFundAddr, a.execaddr, cur.CurRule.ProposalAmount)
if err != nil { // if err != nil {
alog.Error("votePropProject ", "addr", cur.Address, "execaddr", a.execaddr, "ExecTransferFrozen amount fail", err) // alog.Error("votePropProject ", "addr", cur.Address, "execaddr", a.execaddr, "ExecTransferFrozen amount fail", err)
return nil, err // return nil, err
} // }
logs = append(logs, receipt.Logs...) // logs = append(logs, receipt.Logs...)
kv = append(kv, receipt.KV...) // kv = append(kv, receipt.KV...)
} //}
if cur.BoardVoteRes.TotalVotes != 0 && if cur.BoardVoteRes.TotalVotes != 0 &&
float32(cur.BoardVoteRes.ApproveVotes)/float32(cur.BoardVoteRes.TotalVotes) >= float32(cur.CurRule.BoardApproveRatio)/100.0 { float32(cur.BoardVoteRes.ApproveVotes)/float32(cur.BoardVoteRes.TotalVotes) >= float32(cur.CurRule.BoardApproveRatio)/100.0 {
...@@ -258,7 +266,7 @@ func (a *action) votePropProject(voteProb *auty.VoteProposalProject) (*types.Rec ...@@ -258,7 +266,7 @@ func (a *action) votePropProject(voteProb *auty.VoteProposalProject) (*types.Rec
} else { } else {
cur.Status = auty.AutonomyStatusTmintPropProject cur.Status = auty.AutonomyStatusTmintPropProject
// 提案通过,将工程金额从基金付款给承包商 // 提案通过,将工程金额从基金付款给承包商
receipt, err := a.coinsAccount.ExecTransferFrozen(autonomyFundAddr, cur.PropProject.ToAddr, a.execaddr, cur.PropProject.Amount) receipt, err := a.coinsAccount.Transfer(a.execaddr, cur.PropProject.ToAddr, cur.PropProject.Amount)
if err != nil { if err != nil {
alog.Error("votePropProject ", "addr", cur.Address, "execaddr", a.execaddr, "ExecTransferFrozen to contractor project amount fail", err) alog.Error("votePropProject ", "addr", cur.Address, "execaddr", a.execaddr, "ExecTransferFrozen to contractor project amount fail", err)
return nil, err return nil, err
...@@ -379,14 +387,14 @@ func (a *action) pubVotePropProject(voteProb *auty.PubVoteProposalProject) (*typ ...@@ -379,14 +387,14 @@ func (a *action) pubVotePropProject(voteProb *auty.PubVoteProposalProject) (*typ
cur.PubVote.PubPass = false cur.PubVote.PubPass = false
cur.PropProject.RealEndBlockHeight = a.height cur.PropProject.RealEndBlockHeight = a.height
// 解冻项目金 //// 解冻项目金
receiptPrj, err := a.coinsAccount.ExecActive(autonomyFundAddr, a.execaddr, cur.PropProject.Amount) //receiptPrj, err := a.coinsAccount.ExecActive(autonomyFundAddr, a.execaddr, cur.PropProject.Amount)
if err != nil { //if err != nil {
alog.Error("pubVotePropProject ", "addr", a.fromaddr, "execaddr", a.execaddr, "ExecActive project amount", cur.PropProject.Amount, "error", err) // alog.Error("pubVotePropProject ", "addr", a.fromaddr, "execaddr", a.execaddr, "ExecActive project amount", cur.PropProject.Amount, "error", err)
return nil, err // return nil, err
} //}
logs = append(logs, receiptPrj.Logs...) //logs = append(logs, receiptPrj.Logs...)
kv = append(kv, receiptPrj.KV...) //kv = append(kv, receiptPrj.KV...)
} }
key := propProjectID(voteProb.ProposalID) key := propProjectID(voteProb.ProposalID)
...@@ -471,20 +479,20 @@ func (a *action) tmintPropProject(tmintProb *auty.TerminateProposalProject) (*ty ...@@ -471,20 +479,20 @@ func (a *action) tmintPropProject(tmintProb *auty.TerminateProposalProject) (*ty
var kv []*types.KeyValue var kv []*types.KeyValue
// 如果为提案状态,则判断是否需要扣除提案费 // 如果为提案状态,则判断是否需要扣除提案费
if cur.Status == auty.AutonomyStatusProposalProject && a.height > end { //if cur.Status == auty.AutonomyStatusProposalProject && a.height > end {
receipt, err := a.coinsAccount.ExecTransferFrozen(cur.Address, autonomyFundAddr, a.execaddr, cur.CurRule.ProposalAmount) // receipt, err := a.coinsAccount.ExecTransferFrozen(cur.Address, autonomyFundAddr, a.execaddr, cur.CurRule.ProposalAmount)
if err != nil { // if err != nil {
alog.Error("tmintPropProject ", "addr", cur.Address, "execaddr", a.execaddr, "ExecTransferFrozen amount fail", err) // alog.Error("tmintPropProject ", "addr", cur.Address, "execaddr", a.execaddr, "ExecTransferFrozen amount fail", err)
return nil, err // return nil, err
} // }
logs = append(logs, receipt.Logs...) // logs = append(logs, receipt.Logs...)
kv = append(kv, receipt.KV...) // kv = append(kv, receipt.KV...)
} //}
if (cur.PubVote.Publicity && cur.PubVote.PubPass) || // 需要公示且公示通过 if (cur.PubVote.Publicity && cur.PubVote.PubPass) || // 需要公示且公示通过
(!cur.PubVote.Publicity && cur.BoardVoteRes.Pass) { // 不需要公示且董事会通过 (!cur.PubVote.Publicity && cur.BoardVoteRes.Pass) { // 不需要公示且董事会通过
// 提案通过,将工程金额从基金付款给承包商 // 提案通过,将工程金额从基金付款给承包商
receipt, err := a.coinsAccount.ExecTransferFrozen(autonomyFundAddr, cur.PropProject.ToAddr, a.execaddr, cur.PropProject.Amount) receipt, err := a.coinsAccount.Transfer(a.execaddr, cur.PropProject.ToAddr, cur.PropProject.Amount)
if err != nil { if err != nil {
alog.Error("tmintPropProject ", "addr", cur.Address, "execaddr", a.execaddr, "ExecTransferFrozen to contractor project amount fail", err) alog.Error("tmintPropProject ", "addr", cur.Address, "execaddr", a.execaddr, "ExecTransferFrozen to contractor project amount fail", err)
return nil, err return nil, err
...@@ -498,16 +506,17 @@ func (a *action) tmintPropProject(tmintProb *auty.TerminateProposalProject) (*ty ...@@ -498,16 +506,17 @@ func (a *action) tmintPropProject(tmintProb *auty.TerminateProposalProject) (*ty
return nil, err return nil, err
} }
kv = append(kv, pakv) kv = append(kv, pakv)
} else {
// 解冻项目金
receiptPrj, err := a.coinsAccount.ExecActive(autonomyFundAddr, a.execaddr, cur.PropProject.Amount)
if err != nil {
alog.Error("tmintPropProject ", "addr", a.fromaddr, "execaddr", a.execaddr, "ExecActive project amount", cur.PropProject.Amount, "error", err)
return nil, err
}
logs = append(logs, receiptPrj.Logs...)
kv = append(kv, receiptPrj.KV...)
} }
// else {
// // 解冻项目金
// receiptPrj, err := a.coinsAccount.ExecActive(autonomyFundAddr, a.execaddr, cur.PropProject.Amount)
// if err != nil {
// alog.Error("tmintPropProject ", "addr", a.fromaddr, "execaddr", a.execaddr, "ExecActive project amount", cur.PropProject.Amount, "error", err)
// return nil, err
// }
// logs = append(logs, receiptPrj.Logs...)
// kv = append(kv, receiptPrj.KV...)
//}
cur.Status = auty.AutonomyStatusTmintPropProject cur.Status = auty.AutonomyStatusTmintPropProject
......
...@@ -28,10 +28,10 @@ import ( ...@@ -28,10 +28,10 @@ import (
// testLargeProjectAmount int64 = 1 // testLargeProjectAmount int64 = 1
//) //)
var autonomyAddr = address.ExecAddress(auty.AutonomyX)
const ( const (
testProjectAmount int64 = types.Coin * 100 // 工程需要资金 testProjectAmount int64 = types.Coin * 100 // 工程需要资金
testFundAmount int64 = types.Coin * 1000 // 工程需要资金
) )
func InitBoard(stateDB dbm.KV) { func InitBoard(stateDB dbm.KV) {
...@@ -58,11 +58,12 @@ func InitFund(stateDB dbm.KV, amount int64) { ...@@ -58,11 +58,12 @@ func InitFund(stateDB dbm.KV, amount int64) {
accountA := types.Account{ accountA := types.Account{
Balance: amount, Balance: amount,
Frozen: 0, Frozen: 0,
Addr: autonomyFundAddr, Addr: autonomyAddr,
} }
accCoin := account.NewCoinsAccount() accCoin := account.NewCoinsAccount()
accCoin.SetDB(stateDB) accCoin.SetDB(stateDB)
accCoin.SaveExecAccount(autonomyAddr, &accountA) //accCoin.ExecIssueCoins(autonomyAddr, amount)
accCoin.SaveAccount(&accountA)
} }
func TestPropProject(t *testing.T) { func TestPropProject(t *testing.T) {
...@@ -131,7 +132,7 @@ func TestPropProject(t *testing.T) { ...@@ -131,7 +132,7 @@ func TestPropProject(t *testing.T) {
func TestRevokeProposalProject(t *testing.T) { func TestRevokeProposalProject(t *testing.T) {
env, exec, stateDB, kvdb := InitEnv() env, exec, stateDB, kvdb := InitEnv()
InitBoard(stateDB) InitBoard(stateDB)
InitFund(stateDB, testProjectAmount) InitFund(stateDB, testFundAmount)
// PropProject // PropProject
testPropProject(t, env, exec, stateDB, kvdb, true) testPropProject(t, env, exec, stateDB, kvdb, true)
//RevokeProposalProject //RevokeProposalProject
...@@ -141,7 +142,7 @@ func TestRevokeProposalProject(t *testing.T) { ...@@ -141,7 +142,7 @@ func TestRevokeProposalProject(t *testing.T) {
func TestVoteProposalProject(t *testing.T) { func TestVoteProposalProject(t *testing.T) {
env, exec, stateDB, kvdb := InitEnv() env, exec, stateDB, kvdb := InitEnv()
InitBoard(stateDB) InitBoard(stateDB)
InitFund(stateDB, testProjectAmount) InitFund(stateDB, testFundAmount)
// PropProject // PropProject
testPropProject(t, env, exec, stateDB, kvdb, true) testPropProject(t, env, exec, stateDB, kvdb, true)
//voteProposalProject //voteProposalProject
...@@ -154,7 +155,7 @@ func TestPubVoteProposalProject(t *testing.T) { ...@@ -154,7 +155,7 @@ func TestPubVoteProposalProject(t *testing.T) {
env, exec, stateDB, kvdb := InitEnv() env, exec, stateDB, kvdb := InitEnv()
InitBoard(stateDB) InitBoard(stateDB)
InitRule(stateDB) InitRule(stateDB)
InitFund(stateDB, testProjectAmount) InitFund(stateDB, testFundAmount)
// PropProject // PropProject
testPropProject(t, env, exec, stateDB, kvdb, true) testPropProject(t, env, exec, stateDB, kvdb, true)
// voteProposalProject // voteProposalProject
...@@ -169,7 +170,7 @@ func TestPubVoteProposalProject(t *testing.T) { ...@@ -169,7 +170,7 @@ func TestPubVoteProposalProject(t *testing.T) {
func TestTerminateProposalProject(t *testing.T) { func TestTerminateProposalProject(t *testing.T) {
env, exec, stateDB, kvdb := InitEnv() env, exec, stateDB, kvdb := InitEnv()
InitBoard(stateDB) InitBoard(stateDB)
InitFund(stateDB, testProjectAmount) InitFund(stateDB, testFundAmount)
// PropProject // PropProject
testPropProject(t, env, exec, stateDB, kvdb, true) testPropProject(t, env, exec, stateDB, kvdb, true)
//terminateProposalProject //terminateProposalProject
...@@ -262,8 +263,8 @@ func testPropProject(t *testing.T, env *ExecEnv, exec drivers.Driver, stateDB db ...@@ -262,8 +263,8 @@ func testPropProject(t *testing.T, env *ExecEnv, exec drivers.Driver, stateDB db
// check // check
accCoin := account.NewCoinsAccount() accCoin := account.NewCoinsAccount()
accCoin.SetDB(stateDB) accCoin.SetDB(stateDB)
account := accCoin.LoadExecAccount(AddrA, address.ExecAddress(auty.AutonomyX)) account := accCoin.LoadAccount(address.ExecAddress(auty.AutonomyX))
assert.Equal(t, proposalAmount, account.Frozen) assert.Equal(t, proposalAmount + testFundAmount, account.Balance)
} }
func propProjectTx(parm *auty.ProposalProject) (*types.Transaction, error) { func propProjectTx(parm *auty.ProposalProject) (*types.Transaction, error) {
...@@ -313,8 +314,8 @@ func revokeProposalProject(t *testing.T, env *ExecEnv, exec drivers.Driver, stat ...@@ -313,8 +314,8 @@ func revokeProposalProject(t *testing.T, env *ExecEnv, exec drivers.Driver, stat
// check // check
accCoin := account.NewCoinsAccount() accCoin := account.NewCoinsAccount()
accCoin.SetDB(stateDB) accCoin.SetDB(stateDB)
account := accCoin.LoadExecAccount(AddrA, address.ExecAddress(auty.AutonomyX)) account := accCoin.LoadAccount(address.ExecAddress(auty.AutonomyX))
assert.Equal(t, int64(0), account.Frozen) assert.Equal(t, testFundAmount, account.Balance)
// check Project // check Project
au := &Autonomy{ au := &Autonomy{
drivers.DriverBase{}, drivers.DriverBase{},
...@@ -443,13 +444,6 @@ func voteProposalProjectTx(parm *auty.VoteProposalProject) (*types.Transaction, ...@@ -443,13 +444,6 @@ func voteProposalProjectTx(parm *auty.VoteProposalProject) (*types.Transaction,
func checkVoteProposalProjectResult(t *testing.T, stateDB dbm.KV, proposalID string) { func checkVoteProposalProjectResult(t *testing.T, stateDB dbm.KV, proposalID string) {
// check // check
// balance
accCoin := account.NewCoinsAccount()
accCoin.SetDB(stateDB)
account := accCoin.LoadExecAccount(AddrA, address.ExecAddress(auty.AutonomyX))
assert.Equal(t, int64(0), account.Frozen)
account = accCoin.LoadExecAccount(autonomyFundAddr, address.ExecAddress(auty.AutonomyX))
assert.Equal(t, proposalAmount, account.Balance)
// status // status
value, err := stateDB.Get(propProjectID(proposalID)) value, err := stateDB.Get(propProjectID(proposalID))
assert.NoError(t, err) assert.NoError(t, err)
...@@ -458,7 +452,15 @@ func checkVoteProposalProjectResult(t *testing.T, stateDB dbm.KV, proposalID str ...@@ -458,7 +452,15 @@ func checkVoteProposalProjectResult(t *testing.T, stateDB dbm.KV, proposalID str
assert.NoError(t, err) assert.NoError(t, err)
assert.Equal(t, int32(auty.AutonomyStatusTmintPropProject), cur.Status) assert.Equal(t, int32(auty.AutonomyStatusTmintPropProject), cur.Status)
assert.Equal(t, AddrA, cur.Address) assert.Equal(t, AddrA, cur.Address)
// balance
accCoin := account.NewCoinsAccount()
accCoin.SetDB(stateDB)
account := accCoin.LoadAccount(AddrA)
assert.Equal(t, total - proposalAmount, account.Balance)
account = accCoin.LoadAccount(AddrD)
assert.Equal(t, total + testProjectAmount, account.Balance)
account = accCoin.LoadAccount(address.ExecAddress(auty.AutonomyX))
assert.Equal(t, testFundAmount + proposalAmount - testProjectAmount, account.Balance)
// 更新董事会累计审批金 // 更新董事会累计审批金
value, err = stateDB.Get(activeBoardID()) value, err = stateDB.Get(activeBoardID())
assert.NoError(t, err) assert.NoError(t, err)
...@@ -559,13 +561,6 @@ func pubVoteProposalProject(t *testing.T, env *ExecEnv, exec drivers.Driver, sta ...@@ -559,13 +561,6 @@ func pubVoteProposalProject(t *testing.T, env *ExecEnv, exec drivers.Driver, sta
func checkPubVoteProposalProjectResult(t *testing.T, stateDB dbm.KV, proposalID string) { func checkPubVoteProposalProjectResult(t *testing.T, stateDB dbm.KV, proposalID string) {
// check // check
// balance
accCoin := account.NewCoinsAccount()
accCoin.SetDB(stateDB)
account := accCoin.LoadExecAccount(AddrA, address.ExecAddress(auty.AutonomyX))
assert.Equal(t, int64(0), account.Frozen)
account = accCoin.LoadExecAccount(autonomyFundAddr, address.ExecAddress(auty.AutonomyX))
assert.Equal(t, proposalAmount+testProjectAmount, account.Balance)
// status // status
value, err := stateDB.Get(propProjectID(proposalID)) value, err := stateDB.Get(propProjectID(proposalID))
assert.NoError(t, err) assert.NoError(t, err)
...@@ -574,6 +569,15 @@ func checkPubVoteProposalProjectResult(t *testing.T, stateDB dbm.KV, proposalID ...@@ -574,6 +569,15 @@ func checkPubVoteProposalProjectResult(t *testing.T, stateDB dbm.KV, proposalID
assert.NoError(t, err) assert.NoError(t, err)
assert.Equal(t, int32(auty.AutonomyStatusTmintPropProject), cur.Status) assert.Equal(t, int32(auty.AutonomyStatusTmintPropProject), cur.Status)
assert.Equal(t, AddrA, cur.Address) assert.Equal(t, AddrA, cur.Address)
// balance
accCoin := account.NewCoinsAccount()
accCoin.SetDB(stateDB)
account := accCoin.LoadAccount(AddrA)
assert.Equal(t, total - proposalAmount, account.Balance)
account = accCoin.LoadAccount(AddrD)
assert.Equal(t, total, account.Balance)
account = accCoin.LoadAccount(address.ExecAddress(auty.AutonomyX))
assert.Equal(t, testFundAmount + proposalAmount, account.Balance)
// 更新董事会累计审批金 // 更新董事会累计审批金
value, err = stateDB.Get(activeBoardID()) value, err = stateDB.Get(activeBoardID())
...@@ -646,8 +650,10 @@ func terminateProposalProject(t *testing.T, env *ExecEnv, exec drivers.Driver, s ...@@ -646,8 +650,10 @@ func terminateProposalProject(t *testing.T, env *ExecEnv, exec drivers.Driver, s
// check // check
accCoin := account.NewCoinsAccount() accCoin := account.NewCoinsAccount()
accCoin.SetDB(stateDB) accCoin.SetDB(stateDB)
account := accCoin.LoadExecAccount(AddrA, address.ExecAddress(auty.AutonomyX)) account := accCoin.LoadAccount(AddrA)
assert.Equal(t, int64(0), account.Frozen) assert.Equal(t, total - proposalAmount, account.Balance)
account = accCoin.LoadAccount(address.ExecAddress(auty.AutonomyX))
assert.Equal(t, testFundAmount + proposalAmount, account.Balance)
// check Project // check Project
au := &Autonomy{ au := &Autonomy{
......
...@@ -304,7 +304,7 @@ func (a *action) tmintPropRule(tmintProb *auty.TerminateProposalRule) (*types.Re ...@@ -304,7 +304,7 @@ func (a *action) tmintPropRule(tmintProb *auty.TerminateProposalRule) (*types.Re
start := cur.GetPropRule().StartBlockHeight start := cur.GetPropRule().StartBlockHeight
end := cur.GetPropRule().EndBlockHeight end := cur.GetPropRule().EndBlockHeight
if a.height < end && !cur.VoteResult.Pass { if a.height <= end && !cur.VoteResult.Pass {
err := auty.ErrTerminatePeriod err := auty.ErrTerminatePeriod
alog.Error("tmintPropRule ", "addr", a.fromaddr, "status", cur.Status, "height", a.height, alog.Error("tmintPropRule ", "addr", a.fromaddr, "status", cur.Status, "height", a.height,
"in vote period can not terminate", tmintProb.ProposalID, "err", err) "in vote period can not terminate", tmintProb.ProposalID, "err", err)
......
...@@ -33,7 +33,7 @@ message ProposalChange { ...@@ -33,7 +33,7 @@ message ProposalChange {
int32 day = 3; int32 day = 3;
// 修改董事会成员 // 修改董事会成员
repeated Change Changes = 4; repeated Change changes = 4;
// 投票相关 // 投票相关
int64 startBlockHeight = 5; // 提案开始投票高度 int64 startBlockHeight = 5; // 提案开始投票高度
......
// Code generated by protoc-gen-go. DO NOT EDIT. // Code generated by protoc-gen-go. DO NOT EDIT.
// source: autonomy.proto // source: autonomy.proto
/*
Package types is a generated protocol buffer package.
It is generated from these files:
autonomy.proto
board.proto
change.proto
lcommon.proto
project.proto
rule.proto
It has these top-level messages:
AutonomyAction
AutonomyProposalBoard
ProposalBoard
RevokeProposalBoard
VoteProposalBoard
TerminateProposalBoard
ReceiptProposalBoard
LocalProposalBoard
ReqQueryProposalBoard
ReplyQueryProposalBoard
AutonomyProposalChange
ProposalChange
Change
RevokeProposalChange
VoteProposalChange
TerminateProposalChange
ReceiptProposalChange
LocalProposalChange
ReqQueryProposalChange
ReplyQueryProposalChange
VoteResult
PublicVote
VotesRecord
RuleConfig
ActiveBoard
AutonomyProposalProject
ProposalProject
RevokeProposalProject
VoteProposalProject
PubVoteProposalProject
TerminateProposalProject
ReceiptProposalProject
LocalProposalProject
ReqQueryProposalProject
ReplyQueryProposalProject
AutonomyProposalRule
ProposalRule
RevokeProposalRule
VoteProposalRule
TerminateProposalRule
ReceiptProposalRule
LocalProposalRule
ReqQueryProposalRule
ReplyQueryProposalRule
TransferFund
Comment
ReceiptProposalComment
ReqQueryProposalComment
RelationCmt
ReplyQueryProposalComment
*/
package types package types
import ( import proto "github.com/golang/protobuf/proto"
fmt "fmt" import fmt "fmt"
import math "math"
proto "github.com/golang/protobuf/proto"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used. // Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal var _ = proto.Marshal
...@@ -44,154 +103,96 @@ type AutonomyAction struct { ...@@ -44,154 +103,96 @@ type AutonomyAction struct {
// *AutonomyAction_RvkPropChange // *AutonomyAction_RvkPropChange
// *AutonomyAction_VotePropChange // *AutonomyAction_VotePropChange
// *AutonomyAction_TmintPropChange // *AutonomyAction_TmintPropChange
Value isAutonomyAction_Value `protobuf_oneof:"value"` Value isAutonomyAction_Value `protobuf_oneof:"value"`
Ty int32 `protobuf:"varint,20,opt,name=ty,proto3" json:"ty,omitempty"` Ty int32 `protobuf:"varint,20,opt,name=ty" json:"ty,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *AutonomyAction) Reset() { *m = AutonomyAction{} }
func (m *AutonomyAction) String() string { return proto.CompactTextString(m) }
func (*AutonomyAction) ProtoMessage() {}
func (*AutonomyAction) Descriptor() ([]byte, []int) {
return fileDescriptor_autonomy_a527d25057c6879d, []int{0}
}
func (m *AutonomyAction) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_AutonomyAction.Unmarshal(m, b)
}
func (m *AutonomyAction) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_AutonomyAction.Marshal(b, m, deterministic)
}
func (dst *AutonomyAction) XXX_Merge(src proto.Message) {
xxx_messageInfo_AutonomyAction.Merge(dst, src)
}
func (m *AutonomyAction) XXX_Size() int {
return xxx_messageInfo_AutonomyAction.Size(m)
}
func (m *AutonomyAction) XXX_DiscardUnknown() {
xxx_messageInfo_AutonomyAction.DiscardUnknown(m)
} }
var xxx_messageInfo_AutonomyAction proto.InternalMessageInfo func (m *AutonomyAction) Reset() { *m = AutonomyAction{} }
func (m *AutonomyAction) String() string { return proto.CompactTextString(m) }
func (*AutonomyAction) ProtoMessage() {}
func (*AutonomyAction) Descriptor() ([]byte, []int) { return fileDescriptor0, []int{0} }
type isAutonomyAction_Value interface { type isAutonomyAction_Value interface {
isAutonomyAction_Value() isAutonomyAction_Value()
} }
type AutonomyAction_PropBoard struct { type AutonomyAction_PropBoard struct {
PropBoard *ProposalBoard `protobuf:"bytes,1,opt,name=propBoard,proto3,oneof"` PropBoard *ProposalBoard `protobuf:"bytes,1,opt,name=propBoard,oneof"`
} }
type AutonomyAction_RvkPropBoard struct { type AutonomyAction_RvkPropBoard struct {
RvkPropBoard *RevokeProposalBoard `protobuf:"bytes,2,opt,name=rvkPropBoard,proto3,oneof"` RvkPropBoard *RevokeProposalBoard `protobuf:"bytes,2,opt,name=rvkPropBoard,oneof"`
} }
type AutonomyAction_VotePropBoard struct { type AutonomyAction_VotePropBoard struct {
VotePropBoard *VoteProposalBoard `protobuf:"bytes,3,opt,name=votePropBoard,proto3,oneof"` VotePropBoard *VoteProposalBoard `protobuf:"bytes,3,opt,name=votePropBoard,oneof"`
} }
type AutonomyAction_TmintPropBoard struct { type AutonomyAction_TmintPropBoard struct {
TmintPropBoard *TerminateProposalBoard `protobuf:"bytes,4,opt,name=tmintPropBoard,proto3,oneof"` TmintPropBoard *TerminateProposalBoard `protobuf:"bytes,4,opt,name=tmintPropBoard,oneof"`
} }
type AutonomyAction_PropProject struct { type AutonomyAction_PropProject struct {
PropProject *ProposalProject `protobuf:"bytes,5,opt,name=propProject,proto3,oneof"` PropProject *ProposalProject `protobuf:"bytes,5,opt,name=propProject,oneof"`
} }
type AutonomyAction_RvkPropProject struct { type AutonomyAction_RvkPropProject struct {
RvkPropProject *RevokeProposalProject `protobuf:"bytes,6,opt,name=rvkPropProject,proto3,oneof"` RvkPropProject *RevokeProposalProject `protobuf:"bytes,6,opt,name=rvkPropProject,oneof"`
} }
type AutonomyAction_VotePropProject struct { type AutonomyAction_VotePropProject struct {
VotePropProject *VoteProposalProject `protobuf:"bytes,7,opt,name=votePropProject,proto3,oneof"` VotePropProject *VoteProposalProject `protobuf:"bytes,7,opt,name=votePropProject,oneof"`
} }
type AutonomyAction_PubVotePropProject struct { type AutonomyAction_PubVotePropProject struct {
PubVotePropProject *PubVoteProposalProject `protobuf:"bytes,8,opt,name=pubVotePropProject,proto3,oneof"` PubVotePropProject *PubVoteProposalProject `protobuf:"bytes,8,opt,name=pubVotePropProject,oneof"`
} }
type AutonomyAction_TmintPropProject struct { type AutonomyAction_TmintPropProject struct {
TmintPropProject *TerminateProposalProject `protobuf:"bytes,9,opt,name=tmintPropProject,proto3,oneof"` TmintPropProject *TerminateProposalProject `protobuf:"bytes,9,opt,name=tmintPropProject,oneof"`
} }
type AutonomyAction_PropRule struct { type AutonomyAction_PropRule struct {
PropRule *ProposalRule `protobuf:"bytes,10,opt,name=propRule,proto3,oneof"` PropRule *ProposalRule `protobuf:"bytes,10,opt,name=propRule,oneof"`
} }
type AutonomyAction_RvkPropRule struct { type AutonomyAction_RvkPropRule struct {
RvkPropRule *RevokeProposalRule `protobuf:"bytes,11,opt,name=rvkPropRule,proto3,oneof"` RvkPropRule *RevokeProposalRule `protobuf:"bytes,11,opt,name=rvkPropRule,oneof"`
} }
type AutonomyAction_VotePropRule struct { type AutonomyAction_VotePropRule struct {
VotePropRule *VoteProposalRule `protobuf:"bytes,12,opt,name=votePropRule,proto3,oneof"` VotePropRule *VoteProposalRule `protobuf:"bytes,12,opt,name=votePropRule,oneof"`
} }
type AutonomyAction_TmintPropRule struct { type AutonomyAction_TmintPropRule struct {
TmintPropRule *TerminateProposalRule `protobuf:"bytes,13,opt,name=tmintPropRule,proto3,oneof"` TmintPropRule *TerminateProposalRule `protobuf:"bytes,13,opt,name=tmintPropRule,oneof"`
} }
type AutonomyAction_Transfer struct { type AutonomyAction_Transfer struct {
Transfer *TransferFund `protobuf:"bytes,14,opt,name=transfer,proto3,oneof"` Transfer *TransferFund `protobuf:"bytes,14,opt,name=transfer,oneof"`
} }
type AutonomyAction_CommentProp struct { type AutonomyAction_CommentProp struct {
CommentProp *Comment `protobuf:"bytes,15,opt,name=commentProp,proto3,oneof"` CommentProp *Comment `protobuf:"bytes,15,opt,name=commentProp,oneof"`
} }
type AutonomyAction_PropChange struct { type AutonomyAction_PropChange struct {
PropChange *ProposalChange `protobuf:"bytes,16,opt,name=propChange,proto3,oneof"` PropChange *ProposalChange `protobuf:"bytes,16,opt,name=propChange,oneof"`
} }
type AutonomyAction_RvkPropChange struct { type AutonomyAction_RvkPropChange struct {
RvkPropChange *RevokeProposalChange `protobuf:"bytes,17,opt,name=rvkPropChange,proto3,oneof"` RvkPropChange *RevokeProposalChange `protobuf:"bytes,17,opt,name=rvkPropChange,oneof"`
} }
type AutonomyAction_VotePropChange struct { type AutonomyAction_VotePropChange struct {
VotePropChange *VoteProposalChange `protobuf:"bytes,18,opt,name=votePropChange,proto3,oneof"` VotePropChange *VoteProposalChange `protobuf:"bytes,18,opt,name=votePropChange,oneof"`
} }
type AutonomyAction_TmintPropChange struct { type AutonomyAction_TmintPropChange struct {
TmintPropChange *TerminateProposalChange `protobuf:"bytes,19,opt,name=tmintPropChange,proto3,oneof"` TmintPropChange *TerminateProposalChange `protobuf:"bytes,19,opt,name=tmintPropChange,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_TmintPropBoard) isAutonomyAction_Value() {}
func (*AutonomyAction_VotePropBoard) isAutonomyAction_Value() {} func (*AutonomyAction_PropProject) isAutonomyAction_Value() {}
func (*AutonomyAction_RvkPropProject) isAutonomyAction_Value() {}
func (*AutonomyAction_TmintPropBoard) isAutonomyAction_Value() {} func (*AutonomyAction_VotePropProject) isAutonomyAction_Value() {}
func (*AutonomyAction_PropProject) isAutonomyAction_Value() {}
func (*AutonomyAction_RvkPropProject) isAutonomyAction_Value() {}
func (*AutonomyAction_VotePropProject) isAutonomyAction_Value() {}
func (*AutonomyAction_PubVotePropProject) isAutonomyAction_Value() {} func (*AutonomyAction_PubVotePropProject) isAutonomyAction_Value() {}
func (*AutonomyAction_TmintPropProject) isAutonomyAction_Value() {}
func (*AutonomyAction_TmintPropProject) isAutonomyAction_Value() {} func (*AutonomyAction_PropRule) isAutonomyAction_Value() {}
func (*AutonomyAction_RvkPropRule) isAutonomyAction_Value() {}
func (*AutonomyAction_PropRule) isAutonomyAction_Value() {} func (*AutonomyAction_VotePropRule) isAutonomyAction_Value() {}
func (*AutonomyAction_TmintPropRule) isAutonomyAction_Value() {}
func (*AutonomyAction_RvkPropRule) isAutonomyAction_Value() {} func (*AutonomyAction_Transfer) isAutonomyAction_Value() {}
func (*AutonomyAction_CommentProp) isAutonomyAction_Value() {}
func (*AutonomyAction_VotePropRule) isAutonomyAction_Value() {} func (*AutonomyAction_PropChange) isAutonomyAction_Value() {}
func (*AutonomyAction_RvkPropChange) isAutonomyAction_Value() {}
func (*AutonomyAction_TmintPropRule) isAutonomyAction_Value() {} func (*AutonomyAction_VotePropChange) isAutonomyAction_Value() {}
func (*AutonomyAction_TmintPropChange) isAutonomyAction_Value() {}
func (*AutonomyAction_Transfer) isAutonomyAction_Value() {}
func (*AutonomyAction_CommentProp) isAutonomyAction_Value() {}
func (*AutonomyAction_PropChange) isAutonomyAction_Value() {}
func (*AutonomyAction_RvkPropChange) isAutonomyAction_Value() {}
func (*AutonomyAction_VotePropChange) isAutonomyAction_Value() {}
func (*AutonomyAction_TmintPropChange) isAutonomyAction_Value() {}
func (m *AutonomyAction) GetValue() isAutonomyAction_Value { func (m *AutonomyAction) GetValue() isAutonomyAction_Value {
if m != nil { if m != nil {
...@@ -637,97 +638,97 @@ func _AutonomyAction_OneofSizer(msg proto.Message) (n int) { ...@@ -637,97 +638,97 @@ func _AutonomyAction_OneofSizer(msg proto.Message) (n int) {
switch x := m.Value.(type) { switch x := m.Value.(type) {
case *AutonomyAction_PropBoard: case *AutonomyAction_PropBoard:
s := proto.Size(x.PropBoard) s := proto.Size(x.PropBoard)
n += 1 // tag and wire n += proto.SizeVarint(1<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s)) n += proto.SizeVarint(uint64(s))
n += s n += s
case *AutonomyAction_RvkPropBoard: case *AutonomyAction_RvkPropBoard:
s := proto.Size(x.RvkPropBoard) s := proto.Size(x.RvkPropBoard)
n += 1 // tag and wire n += proto.SizeVarint(2<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s)) n += proto.SizeVarint(uint64(s))
n += s n += s
case *AutonomyAction_VotePropBoard: case *AutonomyAction_VotePropBoard:
s := proto.Size(x.VotePropBoard) s := proto.Size(x.VotePropBoard)
n += 1 // tag and wire n += proto.SizeVarint(3<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s)) n += proto.SizeVarint(uint64(s))
n += s n += s
case *AutonomyAction_TmintPropBoard: case *AutonomyAction_TmintPropBoard:
s := proto.Size(x.TmintPropBoard) s := proto.Size(x.TmintPropBoard)
n += 1 // tag and wire n += proto.SizeVarint(4<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s)) n += proto.SizeVarint(uint64(s))
n += s n += s
case *AutonomyAction_PropProject: case *AutonomyAction_PropProject:
s := proto.Size(x.PropProject) s := proto.Size(x.PropProject)
n += 1 // tag and wire n += proto.SizeVarint(5<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s)) n += proto.SizeVarint(uint64(s))
n += s n += s
case *AutonomyAction_RvkPropProject: case *AutonomyAction_RvkPropProject:
s := proto.Size(x.RvkPropProject) s := proto.Size(x.RvkPropProject)
n += 1 // tag and wire n += proto.SizeVarint(6<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s)) n += proto.SizeVarint(uint64(s))
n += s n += s
case *AutonomyAction_VotePropProject: case *AutonomyAction_VotePropProject:
s := proto.Size(x.VotePropProject) s := proto.Size(x.VotePropProject)
n += 1 // tag and wire n += proto.SizeVarint(7<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s)) n += proto.SizeVarint(uint64(s))
n += s n += s
case *AutonomyAction_PubVotePropProject: case *AutonomyAction_PubVotePropProject:
s := proto.Size(x.PubVotePropProject) s := proto.Size(x.PubVotePropProject)
n += 1 // tag and wire n += proto.SizeVarint(8<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s)) n += proto.SizeVarint(uint64(s))
n += s n += s
case *AutonomyAction_TmintPropProject: case *AutonomyAction_TmintPropProject:
s := proto.Size(x.TmintPropProject) s := proto.Size(x.TmintPropProject)
n += 1 // tag and wire 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 += 1 // tag and wire 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 += 1 // tag and wire 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 += 1 // tag and wire 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 += 1 // tag and wire n += proto.SizeVarint(13<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s)) n += proto.SizeVarint(uint64(s))
n += s n += s
case *AutonomyAction_Transfer: case *AutonomyAction_Transfer:
s := proto.Size(x.Transfer) s := proto.Size(x.Transfer)
n += 1 // tag and wire n += proto.SizeVarint(14<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s)) n += proto.SizeVarint(uint64(s))
n += s n += s
case *AutonomyAction_CommentProp: case *AutonomyAction_CommentProp:
s := proto.Size(x.CommentProp) s := proto.Size(x.CommentProp)
n += 1 // tag and wire n += proto.SizeVarint(15<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s)) n += proto.SizeVarint(uint64(s))
n += s n += s
case *AutonomyAction_PropChange: case *AutonomyAction_PropChange:
s := proto.Size(x.PropChange) s := proto.Size(x.PropChange)
n += 2 // tag and wire n += proto.SizeVarint(16<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s)) n += proto.SizeVarint(uint64(s))
n += s n += s
case *AutonomyAction_RvkPropChange: case *AutonomyAction_RvkPropChange:
s := proto.Size(x.RvkPropChange) s := proto.Size(x.RvkPropChange)
n += 2 // tag and wire n += proto.SizeVarint(17<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s)) n += proto.SizeVarint(uint64(s))
n += s n += s
case *AutonomyAction_VotePropChange: case *AutonomyAction_VotePropChange:
s := proto.Size(x.VotePropChange) s := proto.Size(x.VotePropChange)
n += 2 // tag and wire n += proto.SizeVarint(18<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s)) n += proto.SizeVarint(uint64(s))
n += s n += s
case *AutonomyAction_TmintPropChange: case *AutonomyAction_TmintPropChange:
s := proto.Size(x.TmintPropChange) s := proto.Size(x.TmintPropChange)
n += 2 // tag and wire n += proto.SizeVarint(19<<3 | proto.WireBytes)
n += proto.SizeVarint(uint64(s)) n += proto.SizeVarint(uint64(s))
n += s n += s
case nil: case nil:
...@@ -741,9 +742,9 @@ func init() { ...@@ -741,9 +742,9 @@ func init() {
proto.RegisterType((*AutonomyAction)(nil), "types.AutonomyAction") proto.RegisterType((*AutonomyAction)(nil), "types.AutonomyAction")
} }
func init() { proto.RegisterFile("autonomy.proto", fileDescriptor_autonomy_a527d25057c6879d) } func init() { proto.RegisterFile("autonomy.proto", fileDescriptor0) }
var fileDescriptor_autonomy_a527d25057c6879d = []byte{ var fileDescriptor0 = []byte{
// 504 bytes of a gzipped FileDescriptorProto // 504 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x94, 0x4d, 0x6f, 0xd3, 0x40, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x74, 0x94, 0x4d, 0x6f, 0xd3, 0x40,
0x10, 0x40, 0xd3, 0x40, 0xfa, 0x31, 0x8e, 0x9d, 0x32, 0x2d, 0x60, 0xc2, 0x57, 0xc5, 0xa9, 0xa7, 0x10, 0x40, 0xd3, 0x40, 0xfa, 0x31, 0x8e, 0x9d, 0x32, 0x2d, 0x60, 0xc2, 0x57, 0xc5, 0xa9, 0xa7,
......
...@@ -3,65 +3,33 @@ ...@@ -3,65 +3,33 @@
package types package types
import ( import proto "github.com/golang/protobuf/proto"
fmt "fmt" import fmt "fmt"
import math "math"
proto "github.com/golang/protobuf/proto"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used. // Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal var _ = proto.Marshal
var _ = fmt.Errorf var _ = fmt.Errorf
var _ = math.Inf var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
type AutonomyProposalBoard struct { type AutonomyProposalBoard struct {
PropBoard *ProposalBoard `protobuf:"bytes,1,opt,name=propBoard,proto3" json:"propBoard,omitempty"` PropBoard *ProposalBoard `protobuf:"bytes,1,opt,name=propBoard" json:"propBoard,omitempty"`
// 投票该提案的规则 // 投票该提案的规则
CurRule *RuleConfig `protobuf:"bytes,2,opt,name=curRule,proto3" json:"curRule,omitempty"` CurRule *RuleConfig `protobuf:"bytes,2,opt,name=curRule" json:"curRule,omitempty"`
// 全体持票人投票结果 // 全体持票人投票结果
VoteResult *VoteResult `protobuf:"bytes,3,opt,name=voteResult,proto3" json:"voteResult,omitempty"` VoteResult *VoteResult `protobuf:"bytes,3,opt,name=voteResult" json:"voteResult,omitempty"`
// 状态 // 状态
Status int32 `protobuf:"varint,4,opt,name=status,proto3" json:"status,omitempty"` Status int32 `protobuf:"varint,4,opt,name=status" json:"status,omitempty"`
Address string `protobuf:"bytes,5,opt,name=address,proto3" json:"address,omitempty"` Address string `protobuf:"bytes,5,opt,name=address" json:"address,omitempty"`
Height int64 `protobuf:"varint,6,opt,name=height,proto3" json:"height,omitempty"` Height int64 `protobuf:"varint,6,opt,name=height" json:"height,omitempty"`
Index int32 `protobuf:"varint,7,opt,name=index,proto3" json:"index,omitempty"` Index int32 `protobuf:"varint,7,opt,name=index" json:"index,omitempty"`
ProposalID string `protobuf:"bytes,8,opt,name=proposalID,proto3" json:"proposalID,omitempty"` ProposalID string `protobuf:"bytes,8,opt,name=proposalID" json:"proposalID,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
} }
func (m *AutonomyProposalBoard) Reset() { *m = AutonomyProposalBoard{} } func (m *AutonomyProposalBoard) Reset() { *m = AutonomyProposalBoard{} }
func (m *AutonomyProposalBoard) String() string { return proto.CompactTextString(m) } func (m *AutonomyProposalBoard) String() string { return proto.CompactTextString(m) }
func (*AutonomyProposalBoard) ProtoMessage() {} func (*AutonomyProposalBoard) ProtoMessage() {}
func (*AutonomyProposalBoard) Descriptor() ([]byte, []int) { func (*AutonomyProposalBoard) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{0} }
return fileDescriptor_board_eb45f705ab1c071d, []int{0}
}
func (m *AutonomyProposalBoard) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_AutonomyProposalBoard.Unmarshal(m, b)
}
func (m *AutonomyProposalBoard) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_AutonomyProposalBoard.Marshal(b, m, deterministic)
}
func (dst *AutonomyProposalBoard) XXX_Merge(src proto.Message) {
xxx_messageInfo_AutonomyProposalBoard.Merge(dst, src)
}
func (m *AutonomyProposalBoard) XXX_Size() int {
return xxx_messageInfo_AutonomyProposalBoard.Size(m)
}
func (m *AutonomyProposalBoard) XXX_DiscardUnknown() {
xxx_messageInfo_AutonomyProposalBoard.DiscardUnknown(m)
}
var xxx_messageInfo_AutonomyProposalBoard proto.InternalMessageInfo
func (m *AutonomyProposalBoard) GetPropBoard() *ProposalBoard { func (m *AutonomyProposalBoard) GetPropBoard() *ProposalBoard {
if m != nil { if m != nil {
...@@ -122,43 +90,21 @@ func (m *AutonomyProposalBoard) GetProposalID() string { ...@@ -122,43 +90,21 @@ func (m *AutonomyProposalBoard) GetProposalID() string {
// action // action
type ProposalBoard struct { type ProposalBoard struct {
// 提案时间 // 提案时间
Year int32 `protobuf:"varint,1,opt,name=year,proto3" json:"year,omitempty"` Year int32 `protobuf:"varint,1,opt,name=year" json:"year,omitempty"`
Month int32 `protobuf:"varint,2,opt,name=month,proto3" json:"month,omitempty"` Month int32 `protobuf:"varint,2,opt,name=month" json:"month,omitempty"`
Day int32 `protobuf:"varint,3,opt,name=day,proto3" json:"day,omitempty"` Day int32 `protobuf:"varint,3,opt,name=day" json:"day,omitempty"`
// 提案董事会成员 // 提案董事会成员
Boards []string `protobuf:"bytes,4,rep,name=boards,proto3" json:"boards,omitempty"` Boards []string `protobuf:"bytes,4,rep,name=boards" json:"boards,omitempty"`
// 投票相关 // 投票相关
StartBlockHeight int64 `protobuf:"varint,5,opt,name=startBlockHeight,proto3" json:"startBlockHeight,omitempty"` StartBlockHeight int64 `protobuf:"varint,5,opt,name=startBlockHeight" json:"startBlockHeight,omitempty"`
EndBlockHeight int64 `protobuf:"varint,6,opt,name=endBlockHeight,proto3" json:"endBlockHeight,omitempty"` EndBlockHeight int64 `protobuf:"varint,6,opt,name=endBlockHeight" json:"endBlockHeight,omitempty"`
RealEndBlockHeight int64 `protobuf:"varint,7,opt,name=realEndBlockHeight,proto3" json:"realEndBlockHeight,omitempty"` RealEndBlockHeight int64 `protobuf:"varint,7,opt,name=realEndBlockHeight" json:"realEndBlockHeight,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ProposalBoard) Reset() { *m = ProposalBoard{} }
func (m *ProposalBoard) String() string { return proto.CompactTextString(m) }
func (*ProposalBoard) ProtoMessage() {}
func (*ProposalBoard) Descriptor() ([]byte, []int) {
return fileDescriptor_board_eb45f705ab1c071d, []int{1}
}
func (m *ProposalBoard) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ProposalBoard.Unmarshal(m, b)
}
func (m *ProposalBoard) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ProposalBoard.Marshal(b, m, deterministic)
}
func (dst *ProposalBoard) XXX_Merge(src proto.Message) {
xxx_messageInfo_ProposalBoard.Merge(dst, src)
}
func (m *ProposalBoard) XXX_Size() int {
return xxx_messageInfo_ProposalBoard.Size(m)
}
func (m *ProposalBoard) XXX_DiscardUnknown() {
xxx_messageInfo_ProposalBoard.DiscardUnknown(m)
} }
var xxx_messageInfo_ProposalBoard proto.InternalMessageInfo func (m *ProposalBoard) Reset() { *m = ProposalBoard{} }
func (m *ProposalBoard) String() string { return proto.CompactTextString(m) }
func (*ProposalBoard) ProtoMessage() {}
func (*ProposalBoard) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{1} }
func (m *ProposalBoard) GetYear() int32 { func (m *ProposalBoard) GetYear() int32 {
if m != nil { if m != nil {
...@@ -210,35 +156,13 @@ func (m *ProposalBoard) GetRealEndBlockHeight() int64 { ...@@ -210,35 +156,13 @@ func (m *ProposalBoard) GetRealEndBlockHeight() int64 {
} }
type RevokeProposalBoard struct { type RevokeProposalBoard struct {
ProposalID string `protobuf:"bytes,1,opt,name=proposalID,proto3" json:"proposalID,omitempty"` ProposalID string `protobuf:"bytes,1,opt,name=proposalID" json:"proposalID,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
} }
func (m *RevokeProposalBoard) Reset() { *m = RevokeProposalBoard{} } func (m *RevokeProposalBoard) Reset() { *m = RevokeProposalBoard{} }
func (m *RevokeProposalBoard) String() string { return proto.CompactTextString(m) } func (m *RevokeProposalBoard) String() string { return proto.CompactTextString(m) }
func (*RevokeProposalBoard) ProtoMessage() {} func (*RevokeProposalBoard) ProtoMessage() {}
func (*RevokeProposalBoard) Descriptor() ([]byte, []int) { func (*RevokeProposalBoard) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{2} }
return fileDescriptor_board_eb45f705ab1c071d, []int{2}
}
func (m *RevokeProposalBoard) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_RevokeProposalBoard.Unmarshal(m, b)
}
func (m *RevokeProposalBoard) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_RevokeProposalBoard.Marshal(b, m, deterministic)
}
func (dst *RevokeProposalBoard) XXX_Merge(src proto.Message) {
xxx_messageInfo_RevokeProposalBoard.Merge(dst, src)
}
func (m *RevokeProposalBoard) XXX_Size() int {
return xxx_messageInfo_RevokeProposalBoard.Size(m)
}
func (m *RevokeProposalBoard) XXX_DiscardUnknown() {
xxx_messageInfo_RevokeProposalBoard.DiscardUnknown(m)
}
var xxx_messageInfo_RevokeProposalBoard proto.InternalMessageInfo
func (m *RevokeProposalBoard) GetProposalID() string { func (m *RevokeProposalBoard) GetProposalID() string {
if m != nil { if m != nil {
...@@ -248,37 +172,15 @@ func (m *RevokeProposalBoard) GetProposalID() string { ...@@ -248,37 +172,15 @@ func (m *RevokeProposalBoard) GetProposalID() string {
} }
type VoteProposalBoard struct { type VoteProposalBoard struct {
ProposalID string `protobuf:"bytes,1,opt,name=proposalID,proto3" json:"proposalID,omitempty"` ProposalID string `protobuf:"bytes,1,opt,name=proposalID" json:"proposalID,omitempty"`
Approve bool `protobuf:"varint,2,opt,name=approve,proto3" json:"approve,omitempty"` Approve bool `protobuf:"varint,2,opt,name=approve" json:"approve,omitempty"`
OriginAddr []string `protobuf:"bytes,3,rep,name=originAddr,proto3" json:"originAddr,omitempty"` OriginAddr []string `protobuf:"bytes,3,rep,name=originAddr" json:"originAddr,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *VoteProposalBoard) Reset() { *m = VoteProposalBoard{} }
func (m *VoteProposalBoard) String() string { return proto.CompactTextString(m) }
func (*VoteProposalBoard) ProtoMessage() {}
func (*VoteProposalBoard) Descriptor() ([]byte, []int) {
return fileDescriptor_board_eb45f705ab1c071d, []int{3}
}
func (m *VoteProposalBoard) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_VoteProposalBoard.Unmarshal(m, b)
}
func (m *VoteProposalBoard) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_VoteProposalBoard.Marshal(b, m, deterministic)
}
func (dst *VoteProposalBoard) XXX_Merge(src proto.Message) {
xxx_messageInfo_VoteProposalBoard.Merge(dst, src)
}
func (m *VoteProposalBoard) XXX_Size() int {
return xxx_messageInfo_VoteProposalBoard.Size(m)
}
func (m *VoteProposalBoard) XXX_DiscardUnknown() {
xxx_messageInfo_VoteProposalBoard.DiscardUnknown(m)
} }
var xxx_messageInfo_VoteProposalBoard proto.InternalMessageInfo func (m *VoteProposalBoard) Reset() { *m = VoteProposalBoard{} }
func (m *VoteProposalBoard) String() string { return proto.CompactTextString(m) }
func (*VoteProposalBoard) ProtoMessage() {}
func (*VoteProposalBoard) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{3} }
func (m *VoteProposalBoard) GetProposalID() string { func (m *VoteProposalBoard) GetProposalID() string {
if m != nil { if m != nil {
...@@ -302,35 +204,13 @@ func (m *VoteProposalBoard) GetOriginAddr() []string { ...@@ -302,35 +204,13 @@ func (m *VoteProposalBoard) GetOriginAddr() []string {
} }
type TerminateProposalBoard struct { type TerminateProposalBoard struct {
ProposalID string `protobuf:"bytes,1,opt,name=proposalID,proto3" json:"proposalID,omitempty"` ProposalID string `protobuf:"bytes,1,opt,name=proposalID" json:"proposalID,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *TerminateProposalBoard) Reset() { *m = TerminateProposalBoard{} }
func (m *TerminateProposalBoard) String() string { return proto.CompactTextString(m) }
func (*TerminateProposalBoard) ProtoMessage() {}
func (*TerminateProposalBoard) Descriptor() ([]byte, []int) {
return fileDescriptor_board_eb45f705ab1c071d, []int{4}
}
func (m *TerminateProposalBoard) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TerminateProposalBoard.Unmarshal(m, b)
}
func (m *TerminateProposalBoard) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_TerminateProposalBoard.Marshal(b, m, deterministic)
}
func (dst *TerminateProposalBoard) XXX_Merge(src proto.Message) {
xxx_messageInfo_TerminateProposalBoard.Merge(dst, src)
}
func (m *TerminateProposalBoard) XXX_Size() int {
return xxx_messageInfo_TerminateProposalBoard.Size(m)
}
func (m *TerminateProposalBoard) XXX_DiscardUnknown() {
xxx_messageInfo_TerminateProposalBoard.DiscardUnknown(m)
} }
var xxx_messageInfo_TerminateProposalBoard proto.InternalMessageInfo func (m *TerminateProposalBoard) Reset() { *m = TerminateProposalBoard{} }
func (m *TerminateProposalBoard) String() string { return proto.CompactTextString(m) }
func (*TerminateProposalBoard) ProtoMessage() {}
func (*TerminateProposalBoard) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{4} }
func (m *TerminateProposalBoard) GetProposalID() string { func (m *TerminateProposalBoard) GetProposalID() string {
if m != nil { if m != nil {
...@@ -341,36 +221,14 @@ func (m *TerminateProposalBoard) GetProposalID() string { ...@@ -341,36 +221,14 @@ func (m *TerminateProposalBoard) GetProposalID() string {
// receipt // receipt
type ReceiptProposalBoard struct { type ReceiptProposalBoard struct {
Prev *AutonomyProposalBoard `protobuf:"bytes,1,opt,name=prev,proto3" json:"prev,omitempty"` Prev *AutonomyProposalBoard `protobuf:"bytes,1,opt,name=prev" json:"prev,omitempty"`
Current *AutonomyProposalBoard `protobuf:"bytes,2,opt,name=current,proto3" json:"current,omitempty"` Current *AutonomyProposalBoard `protobuf:"bytes,2,opt,name=current" json:"current,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
} }
func (m *ReceiptProposalBoard) Reset() { *m = ReceiptProposalBoard{} } func (m *ReceiptProposalBoard) Reset() { *m = ReceiptProposalBoard{} }
func (m *ReceiptProposalBoard) String() string { return proto.CompactTextString(m) } func (m *ReceiptProposalBoard) String() string { return proto.CompactTextString(m) }
func (*ReceiptProposalBoard) ProtoMessage() {} func (*ReceiptProposalBoard) ProtoMessage() {}
func (*ReceiptProposalBoard) Descriptor() ([]byte, []int) { func (*ReceiptProposalBoard) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{5} }
return fileDescriptor_board_eb45f705ab1c071d, []int{5}
}
func (m *ReceiptProposalBoard) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ReceiptProposalBoard.Unmarshal(m, b)
}
func (m *ReceiptProposalBoard) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ReceiptProposalBoard.Marshal(b, m, deterministic)
}
func (dst *ReceiptProposalBoard) XXX_Merge(src proto.Message) {
xxx_messageInfo_ReceiptProposalBoard.Merge(dst, src)
}
func (m *ReceiptProposalBoard) XXX_Size() int {
return xxx_messageInfo_ReceiptProposalBoard.Size(m)
}
func (m *ReceiptProposalBoard) XXX_DiscardUnknown() {
xxx_messageInfo_ReceiptProposalBoard.DiscardUnknown(m)
}
var xxx_messageInfo_ReceiptProposalBoard proto.InternalMessageInfo
func (m *ReceiptProposalBoard) GetPrev() *AutonomyProposalBoard { func (m *ReceiptProposalBoard) GetPrev() *AutonomyProposalBoard {
if m != nil { if m != nil {
...@@ -387,36 +245,14 @@ func (m *ReceiptProposalBoard) GetCurrent() *AutonomyProposalBoard { ...@@ -387,36 +245,14 @@ func (m *ReceiptProposalBoard) GetCurrent() *AutonomyProposalBoard {
} }
type LocalProposalBoard struct { type LocalProposalBoard struct {
PropBd *AutonomyProposalBoard `protobuf:"bytes,1,opt,name=propBd,proto3" json:"propBd,omitempty"` PropBd *AutonomyProposalBoard `protobuf:"bytes,1,opt,name=propBd" json:"propBd,omitempty"`
Comments []string `protobuf:"bytes,2,rep,name=comments,proto3" json:"comments,omitempty"` Comments []string `protobuf:"bytes,2,rep,name=comments" json:"comments,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
} }
func (m *LocalProposalBoard) Reset() { *m = LocalProposalBoard{} } func (m *LocalProposalBoard) Reset() { *m = LocalProposalBoard{} }
func (m *LocalProposalBoard) String() string { return proto.CompactTextString(m) } func (m *LocalProposalBoard) String() string { return proto.CompactTextString(m) }
func (*LocalProposalBoard) ProtoMessage() {} func (*LocalProposalBoard) ProtoMessage() {}
func (*LocalProposalBoard) Descriptor() ([]byte, []int) { func (*LocalProposalBoard) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{6} }
return fileDescriptor_board_eb45f705ab1c071d, []int{6}
}
func (m *LocalProposalBoard) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_LocalProposalBoard.Unmarshal(m, b)
}
func (m *LocalProposalBoard) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_LocalProposalBoard.Marshal(b, m, deterministic)
}
func (dst *LocalProposalBoard) XXX_Merge(src proto.Message) {
xxx_messageInfo_LocalProposalBoard.Merge(dst, src)
}
func (m *LocalProposalBoard) XXX_Size() int {
return xxx_messageInfo_LocalProposalBoard.Size(m)
}
func (m *LocalProposalBoard) XXX_DiscardUnknown() {
xxx_messageInfo_LocalProposalBoard.DiscardUnknown(m)
}
var xxx_messageInfo_LocalProposalBoard proto.InternalMessageInfo
func (m *LocalProposalBoard) GetPropBd() *AutonomyProposalBoard { func (m *LocalProposalBoard) GetPropBd() *AutonomyProposalBoard {
if m != nil { if m != nil {
...@@ -434,40 +270,18 @@ func (m *LocalProposalBoard) GetComments() []string { ...@@ -434,40 +270,18 @@ func (m *LocalProposalBoard) GetComments() []string {
// query // query
type ReqQueryProposalBoard struct { type ReqQueryProposalBoard struct {
Status int32 `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"` Status int32 `protobuf:"varint,1,opt,name=status" json:"status,omitempty"`
Addr string `protobuf:"bytes,2,opt,name=addr,proto3" json:"addr,omitempty"` Addr string `protobuf:"bytes,2,opt,name=addr" json:"addr,omitempty"`
Count int32 `protobuf:"varint,3,opt,name=count,proto3" json:"count,omitempty"` Count int32 `protobuf:"varint,3,opt,name=count" json:"count,omitempty"`
Direction int32 `protobuf:"varint,4,opt,name=direction,proto3" json:"direction,omitempty"` Direction int32 `protobuf:"varint,4,opt,name=direction" json:"direction,omitempty"`
Height int64 `protobuf:"varint,5,opt,name=height,proto3" json:"height,omitempty"` Height int64 `protobuf:"varint,5,opt,name=height" json:"height,omitempty"`
Index int32 `protobuf:"varint,6,opt,name=index,proto3" json:"index,omitempty"` Index int32 `protobuf:"varint,6,opt,name=index" json:"index,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ReqQueryProposalBoard) Reset() { *m = ReqQueryProposalBoard{} }
func (m *ReqQueryProposalBoard) String() string { return proto.CompactTextString(m) }
func (*ReqQueryProposalBoard) ProtoMessage() {}
func (*ReqQueryProposalBoard) Descriptor() ([]byte, []int) {
return fileDescriptor_board_eb45f705ab1c071d, []int{7}
}
func (m *ReqQueryProposalBoard) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ReqQueryProposalBoard.Unmarshal(m, b)
}
func (m *ReqQueryProposalBoard) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ReqQueryProposalBoard.Marshal(b, m, deterministic)
}
func (dst *ReqQueryProposalBoard) XXX_Merge(src proto.Message) {
xxx_messageInfo_ReqQueryProposalBoard.Merge(dst, src)
}
func (m *ReqQueryProposalBoard) XXX_Size() int {
return xxx_messageInfo_ReqQueryProposalBoard.Size(m)
}
func (m *ReqQueryProposalBoard) XXX_DiscardUnknown() {
xxx_messageInfo_ReqQueryProposalBoard.DiscardUnknown(m)
} }
var xxx_messageInfo_ReqQueryProposalBoard proto.InternalMessageInfo func (m *ReqQueryProposalBoard) Reset() { *m = ReqQueryProposalBoard{} }
func (m *ReqQueryProposalBoard) String() string { return proto.CompactTextString(m) }
func (*ReqQueryProposalBoard) ProtoMessage() {}
func (*ReqQueryProposalBoard) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{7} }
func (m *ReqQueryProposalBoard) GetStatus() int32 { func (m *ReqQueryProposalBoard) GetStatus() int32 {
if m != nil { if m != nil {
...@@ -512,35 +326,13 @@ func (m *ReqQueryProposalBoard) GetIndex() int32 { ...@@ -512,35 +326,13 @@ func (m *ReqQueryProposalBoard) GetIndex() int32 {
} }
type ReplyQueryProposalBoard struct { type ReplyQueryProposalBoard struct {
PropBoards []*AutonomyProposalBoard `protobuf:"bytes,1,rep,name=propBoards,proto3" json:"propBoards,omitempty"` PropBoards []*AutonomyProposalBoard `protobuf:"bytes,1,rep,name=propBoards" json:"propBoards,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ReplyQueryProposalBoard) Reset() { *m = ReplyQueryProposalBoard{} }
func (m *ReplyQueryProposalBoard) String() string { return proto.CompactTextString(m) }
func (*ReplyQueryProposalBoard) ProtoMessage() {}
func (*ReplyQueryProposalBoard) Descriptor() ([]byte, []int) {
return fileDescriptor_board_eb45f705ab1c071d, []int{8}
}
func (m *ReplyQueryProposalBoard) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ReplyQueryProposalBoard.Unmarshal(m, b)
}
func (m *ReplyQueryProposalBoard) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ReplyQueryProposalBoard.Marshal(b, m, deterministic)
}
func (dst *ReplyQueryProposalBoard) XXX_Merge(src proto.Message) {
xxx_messageInfo_ReplyQueryProposalBoard.Merge(dst, src)
}
func (m *ReplyQueryProposalBoard) XXX_Size() int {
return xxx_messageInfo_ReplyQueryProposalBoard.Size(m)
}
func (m *ReplyQueryProposalBoard) XXX_DiscardUnknown() {
xxx_messageInfo_ReplyQueryProposalBoard.DiscardUnknown(m)
} }
var xxx_messageInfo_ReplyQueryProposalBoard proto.InternalMessageInfo func (m *ReplyQueryProposalBoard) Reset() { *m = ReplyQueryProposalBoard{} }
func (m *ReplyQueryProposalBoard) String() string { return proto.CompactTextString(m) }
func (*ReplyQueryProposalBoard) ProtoMessage() {}
func (*ReplyQueryProposalBoard) Descriptor() ([]byte, []int) { return fileDescriptor1, []int{8} }
func (m *ReplyQueryProposalBoard) GetPropBoards() []*AutonomyProposalBoard { func (m *ReplyQueryProposalBoard) GetPropBoards() []*AutonomyProposalBoard {
if m != nil { if m != nil {
...@@ -561,9 +353,9 @@ func init() { ...@@ -561,9 +353,9 @@ func init() {
proto.RegisterType((*ReplyQueryProposalBoard)(nil), "types.ReplyQueryProposalBoard") proto.RegisterType((*ReplyQueryProposalBoard)(nil), "types.ReplyQueryProposalBoard")
} }
func init() { proto.RegisterFile("board.proto", fileDescriptor_board_eb45f705ab1c071d) } func init() { proto.RegisterFile("board.proto", fileDescriptor1) }
var fileDescriptor_board_eb45f705ab1c071d = []byte{ var fileDescriptor1 = []byte{
// 559 bytes of a gzipped FileDescriptorProto // 559 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0x4d, 0x6f, 0xd4, 0x30, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0x4d, 0x6f, 0xd4, 0x30,
0x10, 0x95, 0x9b, 0xcd, 0x7e, 0x4c, 0x55, 0xd4, 0x9a, 0x6d, 0xb1, 0xaa, 0x0a, 0xad, 0x72, 0x40, 0x10, 0x95, 0x9b, 0xcd, 0x7e, 0x4c, 0x55, 0xd4, 0x9a, 0x6d, 0xb1, 0xaa, 0x0a, 0xad, 0x72, 0x40,
......
...@@ -3,67 +3,35 @@ ...@@ -3,67 +3,35 @@
package types package types
import ( import proto "github.com/golang/protobuf/proto"
fmt "fmt" import fmt "fmt"
import math "math"
proto "github.com/golang/protobuf/proto"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used. // Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal var _ = proto.Marshal
var _ = fmt.Errorf var _ = fmt.Errorf
var _ = math.Inf var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
type AutonomyProposalChange struct { type AutonomyProposalChange struct {
PropChange *ProposalChange `protobuf:"bytes,1,opt,name=propChange,proto3" json:"propChange,omitempty"` PropChange *ProposalChange `protobuf:"bytes,1,opt,name=propChange" json:"propChange,omitempty"`
// 投票该提案的规则 // 投票该提案的规则
CurRule *RuleConfig `protobuf:"bytes,2,opt,name=curRule,proto3" json:"curRule,omitempty"` CurRule *RuleConfig `protobuf:"bytes,2,opt,name=curRule" json:"curRule,omitempty"`
// 投票董事会 // 投票董事会
Board *ActiveBoard `protobuf:"bytes,3,opt,name=board,proto3" json:"board,omitempty"` Board *ActiveBoard `protobuf:"bytes,3,opt,name=board" json:"board,omitempty"`
// 全体持票人投票结果 // 全体持票人投票结果
VoteResult *VoteResult `protobuf:"bytes,4,opt,name=voteResult,proto3" json:"voteResult,omitempty"` VoteResult *VoteResult `protobuf:"bytes,4,opt,name=voteResult" json:"voteResult,omitempty"`
// 状态 // 状态
Status int32 `protobuf:"varint,5,opt,name=status,proto3" json:"status,omitempty"` Status int32 `protobuf:"varint,5,opt,name=status" json:"status,omitempty"`
Address string `protobuf:"bytes,6,opt,name=address,proto3" json:"address,omitempty"` Address string `protobuf:"bytes,6,opt,name=address" json:"address,omitempty"`
Height int64 `protobuf:"varint,7,opt,name=height,proto3" json:"height,omitempty"` Height int64 `protobuf:"varint,7,opt,name=height" json:"height,omitempty"`
Index int32 `protobuf:"varint,8,opt,name=index,proto3" json:"index,omitempty"` Index int32 `protobuf:"varint,8,opt,name=index" json:"index,omitempty"`
ProposalID string `protobuf:"bytes,9,opt,name=proposalID,proto3" json:"proposalID,omitempty"` ProposalID string `protobuf:"bytes,9,opt,name=proposalID" json:"proposalID,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *AutonomyProposalChange) Reset() { *m = AutonomyProposalChange{} }
func (m *AutonomyProposalChange) String() string { return proto.CompactTextString(m) }
func (*AutonomyProposalChange) ProtoMessage() {}
func (*AutonomyProposalChange) Descriptor() ([]byte, []int) {
return fileDescriptor_change_516b58e9e07ac53d, []int{0}
}
func (m *AutonomyProposalChange) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_AutonomyProposalChange.Unmarshal(m, b)
}
func (m *AutonomyProposalChange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_AutonomyProposalChange.Marshal(b, m, deterministic)
}
func (dst *AutonomyProposalChange) XXX_Merge(src proto.Message) {
xxx_messageInfo_AutonomyProposalChange.Merge(dst, src)
}
func (m *AutonomyProposalChange) XXX_Size() int {
return xxx_messageInfo_AutonomyProposalChange.Size(m)
}
func (m *AutonomyProposalChange) XXX_DiscardUnknown() {
xxx_messageInfo_AutonomyProposalChange.DiscardUnknown(m)
} }
var xxx_messageInfo_AutonomyProposalChange proto.InternalMessageInfo func (m *AutonomyProposalChange) Reset() { *m = AutonomyProposalChange{} }
func (m *AutonomyProposalChange) String() string { return proto.CompactTextString(m) }
func (*AutonomyProposalChange) ProtoMessage() {}
func (*AutonomyProposalChange) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{0} }
func (m *AutonomyProposalChange) GetPropChange() *ProposalChange { func (m *AutonomyProposalChange) GetPropChange() *ProposalChange {
if m != nil { if m != nil {
...@@ -131,43 +99,21 @@ func (m *AutonomyProposalChange) GetProposalID() string { ...@@ -131,43 +99,21 @@ func (m *AutonomyProposalChange) GetProposalID() string {
// action // action
type ProposalChange struct { type ProposalChange struct {
// 提案时间 // 提案时间
Year int32 `protobuf:"varint,1,opt,name=year,proto3" json:"year,omitempty"` Year int32 `protobuf:"varint,1,opt,name=year" json:"year,omitempty"`
Month int32 `protobuf:"varint,2,opt,name=month,proto3" json:"month,omitempty"` Month int32 `protobuf:"varint,2,opt,name=month" json:"month,omitempty"`
Day int32 `protobuf:"varint,3,opt,name=day,proto3" json:"day,omitempty"` Day int32 `protobuf:"varint,3,opt,name=day" json:"day,omitempty"`
// 修改董事会成员 // 修改董事会成员
Changes []*Change `protobuf:"bytes,4,rep,name=Changes,proto3" json:"Changes,omitempty"` Changes []*Change `protobuf:"bytes,4,rep,name=changes" json:"changes,omitempty"`
// 投票相关 // 投票相关
StartBlockHeight int64 `protobuf:"varint,5,opt,name=startBlockHeight,proto3" json:"startBlockHeight,omitempty"` StartBlockHeight int64 `protobuf:"varint,5,opt,name=startBlockHeight" json:"startBlockHeight,omitempty"`
EndBlockHeight int64 `protobuf:"varint,6,opt,name=endBlockHeight,proto3" json:"endBlockHeight,omitempty"` EndBlockHeight int64 `protobuf:"varint,6,opt,name=endBlockHeight" json:"endBlockHeight,omitempty"`
RealEndBlockHeight int64 `protobuf:"varint,7,opt,name=realEndBlockHeight,proto3" json:"realEndBlockHeight,omitempty"` RealEndBlockHeight int64 `protobuf:"varint,7,opt,name=realEndBlockHeight" json:"realEndBlockHeight,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
} }
func (m *ProposalChange) Reset() { *m = ProposalChange{} } func (m *ProposalChange) Reset() { *m = ProposalChange{} }
func (m *ProposalChange) String() string { return proto.CompactTextString(m) } func (m *ProposalChange) String() string { return proto.CompactTextString(m) }
func (*ProposalChange) ProtoMessage() {} func (*ProposalChange) ProtoMessage() {}
func (*ProposalChange) Descriptor() ([]byte, []int) { func (*ProposalChange) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{1} }
return fileDescriptor_change_516b58e9e07ac53d, []int{1}
}
func (m *ProposalChange) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ProposalChange.Unmarshal(m, b)
}
func (m *ProposalChange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ProposalChange.Marshal(b, m, deterministic)
}
func (dst *ProposalChange) XXX_Merge(src proto.Message) {
xxx_messageInfo_ProposalChange.Merge(dst, src)
}
func (m *ProposalChange) XXX_Size() int {
return xxx_messageInfo_ProposalChange.Size(m)
}
func (m *ProposalChange) XXX_DiscardUnknown() {
xxx_messageInfo_ProposalChange.DiscardUnknown(m)
}
var xxx_messageInfo_ProposalChange proto.InternalMessageInfo
func (m *ProposalChange) GetYear() int32 { func (m *ProposalChange) GetYear() int32 {
if m != nil { if m != nil {
...@@ -220,36 +166,14 @@ func (m *ProposalChange) GetRealEndBlockHeight() int64 { ...@@ -220,36 +166,14 @@ func (m *ProposalChange) GetRealEndBlockHeight() int64 {
type Change struct { type Change struct {
// 1 取消 0 恢复 // 1 取消 0 恢复
Cancel bool `protobuf:"varint,1,opt,name=cancel,proto3" json:"cancel,omitempty"` Cancel bool `protobuf:"varint,1,opt,name=cancel" json:"cancel,omitempty"`
Addr string `protobuf:"bytes,2,opt,name=addr,proto3" json:"addr,omitempty"` Addr string `protobuf:"bytes,2,opt,name=addr" json:"addr,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
} }
func (m *Change) Reset() { *m = Change{} } func (m *Change) Reset() { *m = Change{} }
func (m *Change) String() string { return proto.CompactTextString(m) } func (m *Change) String() string { return proto.CompactTextString(m) }
func (*Change) ProtoMessage() {} func (*Change) ProtoMessage() {}
func (*Change) Descriptor() ([]byte, []int) { func (*Change) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{2} }
return fileDescriptor_change_516b58e9e07ac53d, []int{2}
}
func (m *Change) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Change.Unmarshal(m, b)
}
func (m *Change) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Change.Marshal(b, m, deterministic)
}
func (dst *Change) XXX_Merge(src proto.Message) {
xxx_messageInfo_Change.Merge(dst, src)
}
func (m *Change) XXX_Size() int {
return xxx_messageInfo_Change.Size(m)
}
func (m *Change) XXX_DiscardUnknown() {
xxx_messageInfo_Change.DiscardUnknown(m)
}
var xxx_messageInfo_Change proto.InternalMessageInfo
func (m *Change) GetCancel() bool { func (m *Change) GetCancel() bool {
if m != nil { if m != nil {
...@@ -266,35 +190,13 @@ func (m *Change) GetAddr() string { ...@@ -266,35 +190,13 @@ func (m *Change) GetAddr() string {
} }
type RevokeProposalChange struct { type RevokeProposalChange struct {
ProposalID string `protobuf:"bytes,1,opt,name=proposalID,proto3" json:"proposalID,omitempty"` ProposalID string `protobuf:"bytes,1,opt,name=proposalID" json:"proposalID,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *RevokeProposalChange) Reset() { *m = RevokeProposalChange{} }
func (m *RevokeProposalChange) String() string { return proto.CompactTextString(m) }
func (*RevokeProposalChange) ProtoMessage() {}
func (*RevokeProposalChange) Descriptor() ([]byte, []int) {
return fileDescriptor_change_516b58e9e07ac53d, []int{3}
}
func (m *RevokeProposalChange) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_RevokeProposalChange.Unmarshal(m, b)
}
func (m *RevokeProposalChange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_RevokeProposalChange.Marshal(b, m, deterministic)
}
func (dst *RevokeProposalChange) XXX_Merge(src proto.Message) {
xxx_messageInfo_RevokeProposalChange.Merge(dst, src)
}
func (m *RevokeProposalChange) XXX_Size() int {
return xxx_messageInfo_RevokeProposalChange.Size(m)
}
func (m *RevokeProposalChange) XXX_DiscardUnknown() {
xxx_messageInfo_RevokeProposalChange.DiscardUnknown(m)
} }
var xxx_messageInfo_RevokeProposalChange proto.InternalMessageInfo func (m *RevokeProposalChange) Reset() { *m = RevokeProposalChange{} }
func (m *RevokeProposalChange) String() string { return proto.CompactTextString(m) }
func (*RevokeProposalChange) ProtoMessage() {}
func (*RevokeProposalChange) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{3} }
func (m *RevokeProposalChange) GetProposalID() string { func (m *RevokeProposalChange) GetProposalID() string {
if m != nil { if m != nil {
...@@ -304,36 +206,14 @@ func (m *RevokeProposalChange) GetProposalID() string { ...@@ -304,36 +206,14 @@ func (m *RevokeProposalChange) GetProposalID() string {
} }
type VoteProposalChange struct { type VoteProposalChange struct {
ProposalID string `protobuf:"bytes,1,opt,name=proposalID,proto3" json:"proposalID,omitempty"` ProposalID string `protobuf:"bytes,1,opt,name=proposalID" json:"proposalID,omitempty"`
Approve bool `protobuf:"varint,2,opt,name=approve,proto3" json:"approve,omitempty"` Approve bool `protobuf:"varint,2,opt,name=approve" json:"approve,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
} }
func (m *VoteProposalChange) Reset() { *m = VoteProposalChange{} } func (m *VoteProposalChange) Reset() { *m = VoteProposalChange{} }
func (m *VoteProposalChange) String() string { return proto.CompactTextString(m) } func (m *VoteProposalChange) String() string { return proto.CompactTextString(m) }
func (*VoteProposalChange) ProtoMessage() {} func (*VoteProposalChange) ProtoMessage() {}
func (*VoteProposalChange) Descriptor() ([]byte, []int) { func (*VoteProposalChange) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{4} }
return fileDescriptor_change_516b58e9e07ac53d, []int{4}
}
func (m *VoteProposalChange) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_VoteProposalChange.Unmarshal(m, b)
}
func (m *VoteProposalChange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_VoteProposalChange.Marshal(b, m, deterministic)
}
func (dst *VoteProposalChange) XXX_Merge(src proto.Message) {
xxx_messageInfo_VoteProposalChange.Merge(dst, src)
}
func (m *VoteProposalChange) XXX_Size() int {
return xxx_messageInfo_VoteProposalChange.Size(m)
}
func (m *VoteProposalChange) XXX_DiscardUnknown() {
xxx_messageInfo_VoteProposalChange.DiscardUnknown(m)
}
var xxx_messageInfo_VoteProposalChange proto.InternalMessageInfo
func (m *VoteProposalChange) GetProposalID() string { func (m *VoteProposalChange) GetProposalID() string {
if m != nil { if m != nil {
...@@ -350,35 +230,13 @@ func (m *VoteProposalChange) GetApprove() bool { ...@@ -350,35 +230,13 @@ func (m *VoteProposalChange) GetApprove() bool {
} }
type TerminateProposalChange struct { type TerminateProposalChange struct {
ProposalID string `protobuf:"bytes,1,opt,name=proposalID,proto3" json:"proposalID,omitempty"` ProposalID string `protobuf:"bytes,1,opt,name=proposalID" json:"proposalID,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
} }
func (m *TerminateProposalChange) Reset() { *m = TerminateProposalChange{} } func (m *TerminateProposalChange) Reset() { *m = TerminateProposalChange{} }
func (m *TerminateProposalChange) String() string { return proto.CompactTextString(m) } func (m *TerminateProposalChange) String() string { return proto.CompactTextString(m) }
func (*TerminateProposalChange) ProtoMessage() {} func (*TerminateProposalChange) ProtoMessage() {}
func (*TerminateProposalChange) Descriptor() ([]byte, []int) { func (*TerminateProposalChange) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{5} }
return fileDescriptor_change_516b58e9e07ac53d, []int{5}
}
func (m *TerminateProposalChange) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TerminateProposalChange.Unmarshal(m, b)
}
func (m *TerminateProposalChange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_TerminateProposalChange.Marshal(b, m, deterministic)
}
func (dst *TerminateProposalChange) XXX_Merge(src proto.Message) {
xxx_messageInfo_TerminateProposalChange.Merge(dst, src)
}
func (m *TerminateProposalChange) XXX_Size() int {
return xxx_messageInfo_TerminateProposalChange.Size(m)
}
func (m *TerminateProposalChange) XXX_DiscardUnknown() {
xxx_messageInfo_TerminateProposalChange.DiscardUnknown(m)
}
var xxx_messageInfo_TerminateProposalChange proto.InternalMessageInfo
func (m *TerminateProposalChange) GetProposalID() string { func (m *TerminateProposalChange) GetProposalID() string {
if m != nil { if m != nil {
...@@ -389,36 +247,14 @@ func (m *TerminateProposalChange) GetProposalID() string { ...@@ -389,36 +247,14 @@ func (m *TerminateProposalChange) GetProposalID() string {
// receipt // receipt
type ReceiptProposalChange struct { type ReceiptProposalChange struct {
Prev *AutonomyProposalChange `protobuf:"bytes,1,opt,name=prev,proto3" json:"prev,omitempty"` Prev *AutonomyProposalChange `protobuf:"bytes,1,opt,name=prev" json:"prev,omitempty"`
Current *AutonomyProposalChange `protobuf:"bytes,2,opt,name=current,proto3" json:"current,omitempty"` Current *AutonomyProposalChange `protobuf:"bytes,2,opt,name=current" json:"current,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ReceiptProposalChange) Reset() { *m = ReceiptProposalChange{} }
func (m *ReceiptProposalChange) String() string { return proto.CompactTextString(m) }
func (*ReceiptProposalChange) ProtoMessage() {}
func (*ReceiptProposalChange) Descriptor() ([]byte, []int) {
return fileDescriptor_change_516b58e9e07ac53d, []int{6}
}
func (m *ReceiptProposalChange) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ReceiptProposalChange.Unmarshal(m, b)
}
func (m *ReceiptProposalChange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ReceiptProposalChange.Marshal(b, m, deterministic)
}
func (dst *ReceiptProposalChange) XXX_Merge(src proto.Message) {
xxx_messageInfo_ReceiptProposalChange.Merge(dst, src)
}
func (m *ReceiptProposalChange) XXX_Size() int {
return xxx_messageInfo_ReceiptProposalChange.Size(m)
}
func (m *ReceiptProposalChange) XXX_DiscardUnknown() {
xxx_messageInfo_ReceiptProposalChange.DiscardUnknown(m)
} }
var xxx_messageInfo_ReceiptProposalChange proto.InternalMessageInfo func (m *ReceiptProposalChange) Reset() { *m = ReceiptProposalChange{} }
func (m *ReceiptProposalChange) String() string { return proto.CompactTextString(m) }
func (*ReceiptProposalChange) ProtoMessage() {}
func (*ReceiptProposalChange) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{6} }
func (m *ReceiptProposalChange) GetPrev() *AutonomyProposalChange { func (m *ReceiptProposalChange) GetPrev() *AutonomyProposalChange {
if m != nil { if m != nil {
...@@ -435,36 +271,14 @@ func (m *ReceiptProposalChange) GetCurrent() *AutonomyProposalChange { ...@@ -435,36 +271,14 @@ func (m *ReceiptProposalChange) GetCurrent() *AutonomyProposalChange {
} }
type LocalProposalChange struct { type LocalProposalChange struct {
PropBd *AutonomyProposalChange `protobuf:"bytes,1,opt,name=propBd,proto3" json:"propBd,omitempty"` PropBd *AutonomyProposalChange `protobuf:"bytes,1,opt,name=propBd" json:"propBd,omitempty"`
Comments []string `protobuf:"bytes,2,rep,name=comments,proto3" json:"comments,omitempty"` Comments []string `protobuf:"bytes,2,rep,name=comments" json:"comments,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *LocalProposalChange) Reset() { *m = LocalProposalChange{} }
func (m *LocalProposalChange) String() string { return proto.CompactTextString(m) }
func (*LocalProposalChange) ProtoMessage() {}
func (*LocalProposalChange) Descriptor() ([]byte, []int) {
return fileDescriptor_change_516b58e9e07ac53d, []int{7}
}
func (m *LocalProposalChange) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_LocalProposalChange.Unmarshal(m, b)
}
func (m *LocalProposalChange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_LocalProposalChange.Marshal(b, m, deterministic)
}
func (dst *LocalProposalChange) XXX_Merge(src proto.Message) {
xxx_messageInfo_LocalProposalChange.Merge(dst, src)
}
func (m *LocalProposalChange) XXX_Size() int {
return xxx_messageInfo_LocalProposalChange.Size(m)
}
func (m *LocalProposalChange) XXX_DiscardUnknown() {
xxx_messageInfo_LocalProposalChange.DiscardUnknown(m)
} }
var xxx_messageInfo_LocalProposalChange proto.InternalMessageInfo func (m *LocalProposalChange) Reset() { *m = LocalProposalChange{} }
func (m *LocalProposalChange) String() string { return proto.CompactTextString(m) }
func (*LocalProposalChange) ProtoMessage() {}
func (*LocalProposalChange) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{7} }
func (m *LocalProposalChange) GetPropBd() *AutonomyProposalChange { func (m *LocalProposalChange) GetPropBd() *AutonomyProposalChange {
if m != nil { if m != nil {
...@@ -482,40 +296,18 @@ func (m *LocalProposalChange) GetComments() []string { ...@@ -482,40 +296,18 @@ func (m *LocalProposalChange) GetComments() []string {
// query // query
type ReqQueryProposalChange struct { type ReqQueryProposalChange struct {
Status int32 `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"` Status int32 `protobuf:"varint,1,opt,name=status" json:"status,omitempty"`
Addr string `protobuf:"bytes,2,opt,name=addr,proto3" json:"addr,omitempty"` Addr string `protobuf:"bytes,2,opt,name=addr" json:"addr,omitempty"`
Count int32 `protobuf:"varint,3,opt,name=count,proto3" json:"count,omitempty"` Count int32 `protobuf:"varint,3,opt,name=count" json:"count,omitempty"`
Direction int32 `protobuf:"varint,4,opt,name=direction,proto3" json:"direction,omitempty"` Direction int32 `protobuf:"varint,4,opt,name=direction" json:"direction,omitempty"`
Height int64 `protobuf:"varint,5,opt,name=height,proto3" json:"height,omitempty"` Height int64 `protobuf:"varint,5,opt,name=height" json:"height,omitempty"`
Index int32 `protobuf:"varint,6,opt,name=index,proto3" json:"index,omitempty"` Index int32 `protobuf:"varint,6,opt,name=index" json:"index,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ReqQueryProposalChange) Reset() { *m = ReqQueryProposalChange{} }
func (m *ReqQueryProposalChange) String() string { return proto.CompactTextString(m) }
func (*ReqQueryProposalChange) ProtoMessage() {}
func (*ReqQueryProposalChange) Descriptor() ([]byte, []int) {
return fileDescriptor_change_516b58e9e07ac53d, []int{8}
}
func (m *ReqQueryProposalChange) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ReqQueryProposalChange.Unmarshal(m, b)
}
func (m *ReqQueryProposalChange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ReqQueryProposalChange.Marshal(b, m, deterministic)
}
func (dst *ReqQueryProposalChange) XXX_Merge(src proto.Message) {
xxx_messageInfo_ReqQueryProposalChange.Merge(dst, src)
}
func (m *ReqQueryProposalChange) XXX_Size() int {
return xxx_messageInfo_ReqQueryProposalChange.Size(m)
}
func (m *ReqQueryProposalChange) XXX_DiscardUnknown() {
xxx_messageInfo_ReqQueryProposalChange.DiscardUnknown(m)
} }
var xxx_messageInfo_ReqQueryProposalChange proto.InternalMessageInfo func (m *ReqQueryProposalChange) Reset() { *m = ReqQueryProposalChange{} }
func (m *ReqQueryProposalChange) String() string { return proto.CompactTextString(m) }
func (*ReqQueryProposalChange) ProtoMessage() {}
func (*ReqQueryProposalChange) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{8} }
func (m *ReqQueryProposalChange) GetStatus() int32 { func (m *ReqQueryProposalChange) GetStatus() int32 {
if m != nil { if m != nil {
...@@ -560,35 +352,13 @@ func (m *ReqQueryProposalChange) GetIndex() int32 { ...@@ -560,35 +352,13 @@ func (m *ReqQueryProposalChange) GetIndex() int32 {
} }
type ReplyQueryProposalChange struct { type ReplyQueryProposalChange struct {
PropChanges []*AutonomyProposalChange `protobuf:"bytes,1,rep,name=propChanges,proto3" json:"propChanges,omitempty"` PropChanges []*AutonomyProposalChange `protobuf:"bytes,1,rep,name=propChanges" json:"propChanges,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ReplyQueryProposalChange) Reset() { *m = ReplyQueryProposalChange{} }
func (m *ReplyQueryProposalChange) String() string { return proto.CompactTextString(m) }
func (*ReplyQueryProposalChange) ProtoMessage() {}
func (*ReplyQueryProposalChange) Descriptor() ([]byte, []int) {
return fileDescriptor_change_516b58e9e07ac53d, []int{9}
}
func (m *ReplyQueryProposalChange) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ReplyQueryProposalChange.Unmarshal(m, b)
}
func (m *ReplyQueryProposalChange) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ReplyQueryProposalChange.Marshal(b, m, deterministic)
}
func (dst *ReplyQueryProposalChange) XXX_Merge(src proto.Message) {
xxx_messageInfo_ReplyQueryProposalChange.Merge(dst, src)
}
func (m *ReplyQueryProposalChange) XXX_Size() int {
return xxx_messageInfo_ReplyQueryProposalChange.Size(m)
}
func (m *ReplyQueryProposalChange) XXX_DiscardUnknown() {
xxx_messageInfo_ReplyQueryProposalChange.DiscardUnknown(m)
} }
var xxx_messageInfo_ReplyQueryProposalChange proto.InternalMessageInfo func (m *ReplyQueryProposalChange) Reset() { *m = ReplyQueryProposalChange{} }
func (m *ReplyQueryProposalChange) String() string { return proto.CompactTextString(m) }
func (*ReplyQueryProposalChange) ProtoMessage() {}
func (*ReplyQueryProposalChange) Descriptor() ([]byte, []int) { return fileDescriptor2, []int{9} }
func (m *ReplyQueryProposalChange) GetPropChanges() []*AutonomyProposalChange { func (m *ReplyQueryProposalChange) GetPropChanges() []*AutonomyProposalChange {
if m != nil { if m != nil {
...@@ -610,9 +380,9 @@ func init() { ...@@ -610,9 +380,9 @@ func init() {
proto.RegisterType((*ReplyQueryProposalChange)(nil), "types.ReplyQueryProposalChange") proto.RegisterType((*ReplyQueryProposalChange)(nil), "types.ReplyQueryProposalChange")
} }
func init() { proto.RegisterFile("change.proto", fileDescriptor_change_516b58e9e07ac53d) } func init() { proto.RegisterFile("change.proto", fileDescriptor2) }
var fileDescriptor_change_516b58e9e07ac53d = []byte{ var fileDescriptor2 = []byte{
// 596 bytes of a gzipped FileDescriptorProto // 596 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0x4d, 0x6f, 0xd4, 0x30, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x54, 0x4d, 0x6f, 0xd4, 0x30,
0x10, 0x55, 0x9a, 0x4d, 0x76, 0x77, 0x4a, 0xab, 0x62, 0xda, 0xc5, 0xaa, 0x00, 0x45, 0x39, 0x40, 0x10, 0x55, 0x9a, 0x4d, 0x76, 0x77, 0x4a, 0xab, 0x62, 0xda, 0xc5, 0xaa, 0x00, 0x45, 0x39, 0x40,
...@@ -633,23 +403,23 @@ var fileDescriptor_change_516b58e9e07ac53d = []byte{ ...@@ -633,23 +403,23 @@ var fileDescriptor_change_516b58e9e07ac53d = []byte{
0x01, 0xe4, 0x41, 0x23, 0x90, 0xd1, 0xe1, 0xfd, 0x1b, 0x3a, 0xb4, 0xa5, 0x3a, 0x91, 0xf8, 0xaf, 0x01, 0xe4, 0x41, 0x23, 0x90, 0xd1, 0xe1, 0xfd, 0x1b, 0x3a, 0xb4, 0xa5, 0x3a, 0x91, 0xf8, 0xaf,
0x07, 0xbb, 0x2b, 0x9a, 0x12, 0xe8, 0xcd, 0x91, 0x2b, 0xab, 0x66, 0xc0, 0xec, 0xd9, 0x14, 0x9f, 0x07, 0xbb, 0x2b, 0x9a, 0x12, 0xe8, 0xcd, 0x91, 0x2b, 0xab, 0x66, 0xc0, 0xec, 0xd9, 0x14, 0x9f,
0x4a, 0xa1, 0x27, 0x56, 0xae, 0x80, 0x35, 0x80, 0xec, 0x81, 0x9f, 0xf1, 0xb9, 0xd5, 0x25, 0x60, 0x4a, 0xa1, 0x27, 0x56, 0xae, 0x80, 0x35, 0x80, 0xec, 0x81, 0x9f, 0xf1, 0xb9, 0xd5, 0x25, 0x60,
0xe6, 0x48, 0x1e, 0x41, 0xbf, 0xa9, 0x52, 0xd1, 0x5e, 0xe4, 0x27, 0xdb, 0xc7, 0x3b, 0xae, 0x7d, 0xe6, 0x48, 0x1e, 0x41, 0xbf, 0xf9, 0xd0, 0x8a, 0xf6, 0x22, 0x3f, 0xd9, 0x3e, 0xde, 0x71, 0xed,
0xf7, 0x09, 0xed, 0x2d, 0x79, 0x0c, 0x7b, 0x95, 0xe6, 0x4a, 0x9f, 0x16, 0x32, 0xbd, 0x7c, 0xd7, 0xbb, 0x4f, 0x68, 0x6f, 0xc9, 0x63, 0xd8, 0xab, 0x34, 0x57, 0xfa, 0xb4, 0x90, 0xe9, 0xe5, 0xbb,
0xf4, 0x13, 0xd8, 0x7e, 0xd6, 0xe2, 0xe4, 0x21, 0xec, 0xa2, 0xc8, 0xba, 0xcc, 0xd0, 0x32, 0x57, 0xa6, 0x9f, 0xc0, 0xf6, 0xb3, 0x16, 0x27, 0x0f, 0x61, 0x17, 0x45, 0xd6, 0x65, 0x86, 0x96, 0xb9,
0xa2, 0x64, 0x0c, 0x44, 0x21, 0x2f, 0xde, 0x2e, 0x73, 0x1b, 0x95, 0x36, 0xdc, 0xc4, 0xcf, 0x20, 0x12, 0x25, 0x63, 0x20, 0x0a, 0x79, 0xf1, 0x76, 0x99, 0xdb, 0xa8, 0xb4, 0xe1, 0x26, 0x7e, 0x06,
0x74, 0x2d, 0x8f, 0x20, 0x4c, 0xb9, 0x48, 0xb1, 0xb0, 0x4d, 0x0f, 0x98, 0x43, 0x46, 0x0a, 0x23, 0xa1, 0x6b, 0x79, 0x04, 0x61, 0xca, 0x45, 0x8a, 0x85, 0x6d, 0x7a, 0xc0, 0x1c, 0x32, 0x52, 0x18,
0xbb, 0xed, 0x7a, 0xc8, 0xec, 0x39, 0x7e, 0x01, 0xfb, 0x0c, 0x67, 0xf2, 0x12, 0x57, 0x64, 0x5b, 0xd9, 0x6d, 0xd7, 0x43, 0x66, 0xcf, 0xf1, 0x0b, 0xd8, 0x67, 0x38, 0x93, 0x97, 0xb8, 0x22, 0xdb,
0x56, 0xda, 0x5b, 0x53, 0xfa, 0x23, 0x10, 0x33, 0x03, 0x37, 0xcb, 0xb2, 0x73, 0x50, 0x96, 0x4a, 0xb2, 0xd2, 0xde, 0x9a, 0xd2, 0x1f, 0x81, 0x98, 0x19, 0xb8, 0x59, 0x96, 0x9d, 0x83, 0xb2, 0x54,
0xce, 0x9a, 0x49, 0x1d, 0xb0, 0x16, 0xc6, 0xaf, 0xe0, 0xee, 0x17, 0x54, 0xd3, 0x5c, 0xf0, 0x9b, 0x72, 0xd6, 0x4c, 0xea, 0x80, 0xb5, 0x30, 0x7e, 0x05, 0x77, 0xbf, 0xa0, 0x9a, 0xe6, 0x82, 0xdf,
0x16, 0x8d, 0x7f, 0x79, 0x70, 0xc0, 0x30, 0xc5, 0xbc, 0xd4, 0x2b, 0x99, 0x47, 0xd0, 0x2b, 0x15, 0xb4, 0x68, 0xfc, 0xcb, 0x83, 0x03, 0x86, 0x29, 0xe6, 0xa5, 0x5e, 0xc9, 0x3c, 0x82, 0x5e, 0xa9,
0xce, 0x9c, 0x93, 0xee, 0xb7, 0xa3, 0xbe, 0xd1, 0x7c, 0xcc, 0x52, 0xc9, 0x4b, 0xeb, 0x25, 0x85, 0x70, 0xe6, 0x9c, 0x74, 0xbf, 0x1d, 0xf5, 0x8d, 0xe6, 0x63, 0x96, 0x4a, 0x5e, 0x5a, 0x2f, 0x29,
0x42, 0x3b, 0x2f, 0x5d, 0x93, 0xd5, 0xb2, 0xe3, 0x09, 0xdc, 0xf9, 0x20, 0x53, 0x5e, 0xac, 0x59, 0x14, 0xda, 0x79, 0xe9, 0x9a, 0xac, 0x96, 0x1d, 0x4f, 0xe0, 0xce, 0x07, 0x99, 0xf2, 0x62, 0xcd,
0x3a, 0x34, 0x4f, 0x3d, 0xcd, 0xfe, 0xef, 0x11, 0x8e, 0x4c, 0x0e, 0x61, 0x60, 0x96, 0x06, 0x0a, 0xd2, 0xa1, 0x79, 0xea, 0x69, 0xf6, 0x7f, 0x8f, 0x70, 0x64, 0x72, 0x08, 0x03, 0xb3, 0x34, 0x50,
0x5d, 0xd1, 0xad, 0xc8, 0x4f, 0x86, 0xec, 0x0a, 0xc7, 0xbf, 0x3d, 0x18, 0x31, 0xfc, 0xf1, 0xb9, 0xe8, 0x8a, 0x6e, 0x45, 0x7e, 0x32, 0x64, 0x57, 0x38, 0xfe, 0xed, 0xc1, 0x88, 0xe1, 0x8f, 0xcf,
0x46, 0xb5, 0xba, 0x40, 0x16, 0xfe, 0xf3, 0x96, 0xfc, 0xb7, 0xe1, 0xe7, 0x8d, 0x09, 0x52, 0x59, 0x35, 0xaa, 0xd5, 0x05, 0xb2, 0xf0, 0x9f, 0xb7, 0xe4, 0xbf, 0x0d, 0x3f, 0x6f, 0x4c, 0x90, 0xca,
0x0b, 0xed, 0x06, 0xbe, 0x01, 0xe4, 0x1e, 0x0c, 0xb3, 0x5c, 0x61, 0xaa, 0x73, 0x29, 0xac, 0xe7, 0x5a, 0x68, 0x37, 0xf0, 0x0d, 0x20, 0xf7, 0x60, 0x98, 0xe5, 0x0a, 0x53, 0x9d, 0x4b, 0x61, 0x3d,
0x03, 0xb6, 0x08, 0x74, 0xdc, 0x1a, 0x6c, 0x76, 0x6b, 0xd8, 0x71, 0x6b, 0xfc, 0x0d, 0x28, 0xc3, 0x1f, 0xb0, 0x45, 0xa0, 0xe3, 0xd6, 0x60, 0xb3, 0x5b, 0xc3, 0x8e, 0x5b, 0xe3, 0x6f, 0x40, 0x19,
0xb2, 0x98, 0x6f, 0x7a, 0xe9, 0x6b, 0xd8, 0x5e, 0x6c, 0x30, 0xf3, 0x5c, 0xff, 0x7a, 0x71, 0xba, 0x96, 0xc5, 0x7c, 0xd3, 0x4b, 0x5f, 0xc3, 0xf6, 0x62, 0x83, 0x99, 0xe7, 0xfa, 0xd7, 0x8b, 0xd3,
0x19, 0xe7, 0xa1, 0xdd, 0xa6, 0x4f, 0xff, 0x05, 0x00, 0x00, 0xff, 0xff, 0x96, 0x4a, 0x21, 0x4d, 0xcd, 0x38, 0x0f, 0xed, 0x36, 0x7d, 0xfa, 0x2f, 0x00, 0x00, 0xff, 0xff, 0x72, 0xff, 0xf5, 0x9d,
0x73, 0x05, 0x00, 0x00, 0x73, 0x05, 0x00, 0x00,
} }
...@@ -35,4 +35,6 @@ var ( ...@@ -35,4 +35,6 @@ var (
ErrBoardNumber = errors.New("ErrBoardNumber") ErrBoardNumber = errors.New("ErrBoardNumber")
// ErrRepeatAddr 重复地址 // ErrRepeatAddr 重复地址
ErrRepeatAddr = errors.New("ErrRepeatAddr") ErrRepeatAddr = errors.New("ErrRepeatAddr")
// ErrNotEnoughFund 重复地址
ErrNotEnoughFund = errors.New("ErrNotEnoughFund")
) )
...@@ -3,62 +3,30 @@ ...@@ -3,62 +3,30 @@
package types package types
import ( import proto "github.com/golang/protobuf/proto"
fmt "fmt" import fmt "fmt"
import math "math"
proto "github.com/golang/protobuf/proto"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used. // Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal var _ = proto.Marshal
var _ = fmt.Errorf var _ = fmt.Errorf
var _ = math.Inf var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
type VoteResult struct { type VoteResult struct {
// 总票数 // 总票数
TotalVotes int32 `protobuf:"varint,1,opt,name=totalVotes,proto3" json:"totalVotes,omitempty"` TotalVotes int32 `protobuf:"varint,1,opt,name=totalVotes" json:"totalVotes,omitempty"`
// 赞成票 // 赞成票
ApproveVotes int32 `protobuf:"varint,2,opt,name=approveVotes,proto3" json:"approveVotes,omitempty"` ApproveVotes int32 `protobuf:"varint,2,opt,name=approveVotes" json:"approveVotes,omitempty"`
// 反对票 // 反对票
OpposeVotes int32 `protobuf:"varint,3,opt,name=opposeVotes,proto3" json:"opposeVotes,omitempty"` OpposeVotes int32 `protobuf:"varint,3,opt,name=opposeVotes" json:"opposeVotes,omitempty"`
// 是否通过 // 是否通过
Pass bool `protobuf:"varint,4,opt,name=pass,proto3" json:"pass,omitempty"` Pass bool `protobuf:"varint,4,opt,name=pass" json:"pass,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *VoteResult) Reset() { *m = VoteResult{} }
func (m *VoteResult) String() string { return proto.CompactTextString(m) }
func (*VoteResult) ProtoMessage() {}
func (*VoteResult) Descriptor() ([]byte, []int) {
return fileDescriptor_lcommon_46832911ed0f42f1, []int{0}
}
func (m *VoteResult) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_VoteResult.Unmarshal(m, b)
}
func (m *VoteResult) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_VoteResult.Marshal(b, m, deterministic)
}
func (dst *VoteResult) XXX_Merge(src proto.Message) {
xxx_messageInfo_VoteResult.Merge(dst, src)
}
func (m *VoteResult) XXX_Size() int {
return xxx_messageInfo_VoteResult.Size(m)
}
func (m *VoteResult) XXX_DiscardUnknown() {
xxx_messageInfo_VoteResult.DiscardUnknown(m)
} }
var xxx_messageInfo_VoteResult proto.InternalMessageInfo func (m *VoteResult) Reset() { *m = VoteResult{} }
func (m *VoteResult) String() string { return proto.CompactTextString(m) }
func (*VoteResult) ProtoMessage() {}
func (*VoteResult) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{0} }
func (m *VoteResult) GetTotalVotes() int32 { func (m *VoteResult) GetTotalVotes() int32 {
if m != nil { if m != nil {
...@@ -90,41 +58,19 @@ func (m *VoteResult) GetPass() bool { ...@@ -90,41 +58,19 @@ func (m *VoteResult) GetPass() bool {
type PublicVote struct { type PublicVote struct {
// 是否需要公示 // 是否需要公示
Publicity bool `protobuf:"varint,1,opt,name=publicity,proto3" json:"publicity,omitempty"` Publicity bool `protobuf:"varint,1,opt,name=publicity" json:"publicity,omitempty"`
// 总票数 // 总票数
TotalVotes int32 `protobuf:"varint,2,opt,name=totalVotes,proto3" json:"totalVotes,omitempty"` TotalVotes int32 `protobuf:"varint,2,opt,name=totalVotes" json:"totalVotes,omitempty"`
// 全体持票人反对票 // 全体持票人反对票
OpposeVotes int32 `protobuf:"varint,3,opt,name=opposeVotes,proto3" json:"opposeVotes,omitempty"` OpposeVotes int32 `protobuf:"varint,3,opt,name=opposeVotes" json:"opposeVotes,omitempty"`
// 是否通过 // 是否通过
PubPass bool `protobuf:"varint,4,opt,name=pubPass,proto3" json:"pubPass,omitempty"` PubPass bool `protobuf:"varint,4,opt,name=pubPass" json:"pubPass,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
} }
func (m *PublicVote) Reset() { *m = PublicVote{} } func (m *PublicVote) Reset() { *m = PublicVote{} }
func (m *PublicVote) String() string { return proto.CompactTextString(m) } func (m *PublicVote) String() string { return proto.CompactTextString(m) }
func (*PublicVote) ProtoMessage() {} func (*PublicVote) ProtoMessage() {}
func (*PublicVote) Descriptor() ([]byte, []int) { func (*PublicVote) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{1} }
return fileDescriptor_lcommon_46832911ed0f42f1, []int{1}
}
func (m *PublicVote) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_PublicVote.Unmarshal(m, b)
}
func (m *PublicVote) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_PublicVote.Marshal(b, m, deterministic)
}
func (dst *PublicVote) XXX_Merge(src proto.Message) {
xxx_messageInfo_PublicVote.Merge(dst, src)
}
func (m *PublicVote) XXX_Size() int {
return xxx_messageInfo_PublicVote.Size(m)
}
func (m *PublicVote) XXX_DiscardUnknown() {
xxx_messageInfo_PublicVote.DiscardUnknown(m)
}
var xxx_messageInfo_PublicVote proto.InternalMessageInfo
func (m *PublicVote) GetPublicity() bool { func (m *PublicVote) GetPublicity() bool {
if m != nil { if m != nil {
...@@ -155,35 +101,13 @@ func (m *PublicVote) GetPubPass() bool { ...@@ -155,35 +101,13 @@ func (m *PublicVote) GetPubPass() bool {
} }
type VotesRecord struct { type VotesRecord struct {
Address []string `protobuf:"bytes,1,rep,name=address,proto3" json:"address,omitempty"` Address []string `protobuf:"bytes,1,rep,name=address" json:"address,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *VotesRecord) Reset() { *m = VotesRecord{} }
func (m *VotesRecord) String() string { return proto.CompactTextString(m) }
func (*VotesRecord) ProtoMessage() {}
func (*VotesRecord) Descriptor() ([]byte, []int) {
return fileDescriptor_lcommon_46832911ed0f42f1, []int{2}
}
func (m *VotesRecord) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_VotesRecord.Unmarshal(m, b)
}
func (m *VotesRecord) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_VotesRecord.Marshal(b, m, deterministic)
}
func (dst *VotesRecord) XXX_Merge(src proto.Message) {
xxx_messageInfo_VotesRecord.Merge(dst, src)
}
func (m *VotesRecord) XXX_Size() int {
return xxx_messageInfo_VotesRecord.Size(m)
}
func (m *VotesRecord) XXX_DiscardUnknown() {
xxx_messageInfo_VotesRecord.DiscardUnknown(m)
} }
var xxx_messageInfo_VotesRecord proto.InternalMessageInfo func (m *VotesRecord) Reset() { *m = VotesRecord{} }
func (m *VotesRecord) String() string { return proto.CompactTextString(m) }
func (*VotesRecord) ProtoMessage() {}
func (*VotesRecord) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{2} }
func (m *VotesRecord) GetAddress() []string { func (m *VotesRecord) GetAddress() []string {
if m != nil { if m != nil {
...@@ -194,43 +118,21 @@ func (m *VotesRecord) GetAddress() []string { ...@@ -194,43 +118,21 @@ func (m *VotesRecord) GetAddress() []string {
type RuleConfig struct { type RuleConfig struct {
// 董事会成员赞成率,以%为单位,只保留整数部分 // 董事会成员赞成率,以%为单位,只保留整数部分
BoardApproveRatio int32 `protobuf:"varint,1,opt,name=boardApproveRatio,proto3" json:"boardApproveRatio,omitempty"` BoardApproveRatio int32 `protobuf:"varint,1,opt,name=boardApproveRatio" json:"boardApproveRatio,omitempty"`
// 全体持票人否决率 // 全体持票人否决率
PubOpposeRatio int32 `protobuf:"varint,2,opt,name=pubOpposeRatio,proto3" json:"pubOpposeRatio,omitempty"` PubOpposeRatio int32 `protobuf:"varint,2,opt,name=pubOpposeRatio" json:"pubOpposeRatio,omitempty"`
// 提案金额 // 提案金额
ProposalAmount int64 `protobuf:"varint,3,opt,name=proposalAmount,proto3" json:"proposalAmount,omitempty"` ProposalAmount int64 `protobuf:"varint,3,opt,name=proposalAmount" json:"proposalAmount,omitempty"`
// 重大项目公示金额阈值 // 重大项目公示金额阈值
LargeProjectAmount int64 `protobuf:"varint,4,opt,name=largeProjectAmount,proto3" json:"largeProjectAmount,omitempty"` LargeProjectAmount int64 `protobuf:"varint,4,opt,name=largeProjectAmount" json:"largeProjectAmount,omitempty"`
// 重大项目公示时间(以区块数为单位) // 重大项目公示时间(以区块数为单位)
PublicPeriod int32 `protobuf:"varint,5,opt,name=publicPeriod,proto3" json:"publicPeriod,omitempty"` PublicPeriod int32 `protobuf:"varint,5,opt,name=publicPeriod" json:"publicPeriod,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
} }
func (m *RuleConfig) Reset() { *m = RuleConfig{} } func (m *RuleConfig) Reset() { *m = RuleConfig{} }
func (m *RuleConfig) String() string { return proto.CompactTextString(m) } func (m *RuleConfig) String() string { return proto.CompactTextString(m) }
func (*RuleConfig) ProtoMessage() {} func (*RuleConfig) ProtoMessage() {}
func (*RuleConfig) Descriptor() ([]byte, []int) { func (*RuleConfig) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{3} }
return fileDescriptor_lcommon_46832911ed0f42f1, []int{3}
}
func (m *RuleConfig) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_RuleConfig.Unmarshal(m, b)
}
func (m *RuleConfig) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_RuleConfig.Marshal(b, m, deterministic)
}
func (dst *RuleConfig) XXX_Merge(src proto.Message) {
xxx_messageInfo_RuleConfig.Merge(dst, src)
}
func (m *RuleConfig) XXX_Size() int {
return xxx_messageInfo_RuleConfig.Size(m)
}
func (m *RuleConfig) XXX_DiscardUnknown() {
xxx_messageInfo_RuleConfig.DiscardUnknown(m)
}
var xxx_messageInfo_RuleConfig proto.InternalMessageInfo
func (m *RuleConfig) GetBoardApproveRatio() int32 { func (m *RuleConfig) GetBoardApproveRatio() int32 {
if m != nil { if m != nil {
...@@ -268,38 +170,16 @@ func (m *RuleConfig) GetPublicPeriod() int32 { ...@@ -268,38 +170,16 @@ func (m *RuleConfig) GetPublicPeriod() int32 {
} }
type ActiveBoard struct { type ActiveBoard struct {
Boards []string `protobuf:"bytes,1,rep,name=boards,proto3" json:"boards,omitempty"` Boards []string `protobuf:"bytes,1,rep,name=boards" json:"boards,omitempty"`
Revboards []string `protobuf:"bytes,2,rep,name=revboards,proto3" json:"revboards,omitempty"` Revboards []string `protobuf:"bytes,2,rep,name=revboards" json:"revboards,omitempty"`
Amount int64 `protobuf:"varint,3,opt,name=amount,proto3" json:"amount,omitempty"` Amount int64 `protobuf:"varint,3,opt,name=amount" json:"amount,omitempty"`
StartHeight int64 `protobuf:"varint,4,opt,name=startHeight,proto3" json:"startHeight,omitempty"` StartHeight int64 `protobuf:"varint,4,opt,name=startHeight" json:"startHeight,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ActiveBoard) Reset() { *m = ActiveBoard{} }
func (m *ActiveBoard) String() string { return proto.CompactTextString(m) }
func (*ActiveBoard) ProtoMessage() {}
func (*ActiveBoard) Descriptor() ([]byte, []int) {
return fileDescriptor_lcommon_46832911ed0f42f1, []int{4}
}
func (m *ActiveBoard) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ActiveBoard.Unmarshal(m, b)
}
func (m *ActiveBoard) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ActiveBoard.Marshal(b, m, deterministic)
}
func (dst *ActiveBoard) XXX_Merge(src proto.Message) {
xxx_messageInfo_ActiveBoard.Merge(dst, src)
}
func (m *ActiveBoard) XXX_Size() int {
return xxx_messageInfo_ActiveBoard.Size(m)
}
func (m *ActiveBoard) XXX_DiscardUnknown() {
xxx_messageInfo_ActiveBoard.DiscardUnknown(m)
} }
var xxx_messageInfo_ActiveBoard proto.InternalMessageInfo func (m *ActiveBoard) Reset() { *m = ActiveBoard{} }
func (m *ActiveBoard) String() string { return proto.CompactTextString(m) }
func (*ActiveBoard) ProtoMessage() {}
func (*ActiveBoard) Descriptor() ([]byte, []int) { return fileDescriptor3, []int{4} }
func (m *ActiveBoard) GetBoards() []string { func (m *ActiveBoard) GetBoards() []string {
if m != nil { if m != nil {
...@@ -337,9 +217,9 @@ func init() { ...@@ -337,9 +217,9 @@ func init() {
proto.RegisterType((*ActiveBoard)(nil), "types.ActiveBoard") proto.RegisterType((*ActiveBoard)(nil), "types.ActiveBoard")
} }
func init() { proto.RegisterFile("lcommon.proto", fileDescriptor_lcommon_46832911ed0f42f1) } func init() { proto.RegisterFile("lcommon.proto", fileDescriptor3) }
var fileDescriptor_lcommon_46832911ed0f42f1 = []byte{ var fileDescriptor3 = []byte{
// 352 bytes of a gzipped FileDescriptorProto // 352 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0xbf, 0x4e, 0xe3, 0x40, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x84, 0x92, 0xbf, 0x4e, 0xe3, 0x40,
0x10, 0x87, 0xe5, 0xfc, 0xbb, 0x64, 0x72, 0x77, 0xd2, 0x6d, 0x71, 0x72, 0x81, 0x50, 0xe4, 0x02, 0x10, 0x87, 0xe5, 0xfc, 0xbb, 0x64, 0x72, 0x77, 0xd2, 0x6d, 0x71, 0x72, 0x81, 0x50, 0xe4, 0x02,
......
...@@ -3,69 +3,37 @@ ...@@ -3,69 +3,37 @@
package types package types
import ( import proto "github.com/golang/protobuf/proto"
fmt "fmt" import fmt "fmt"
import math "math"
proto "github.com/golang/protobuf/proto"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used. // Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal var _ = proto.Marshal
var _ = fmt.Errorf var _ = fmt.Errorf
var _ = math.Inf var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
type AutonomyProposalProject struct { type AutonomyProposalProject struct {
PropProject *ProposalProject `protobuf:"bytes,1,opt,name=propProject,proto3" json:"propProject,omitempty"` PropProject *ProposalProject `protobuf:"bytes,1,opt,name=propProject" json:"propProject,omitempty"`
// 投票该提案的规则 // 投票该提案的规则
CurRule *RuleConfig `protobuf:"bytes,2,opt,name=curRule,proto3" json:"curRule,omitempty"` CurRule *RuleConfig `protobuf:"bytes,2,opt,name=curRule" json:"curRule,omitempty"`
// 投票该提案的董事会成员 // 投票该提案的董事会成员
Boards []string `protobuf:"bytes,3,rep,name=boards,proto3" json:"boards,omitempty"` Boards []string `protobuf:"bytes,3,rep,name=boards" json:"boards,omitempty"`
// 董事会投票结果 // 董事会投票结果
BoardVoteRes *VoteResult `protobuf:"bytes,4,opt,name=boardVoteRes,proto3" json:"boardVoteRes,omitempty"` BoardVoteRes *VoteResult `protobuf:"bytes,4,opt,name=boardVoteRes" json:"boardVoteRes,omitempty"`
// 公示投票 // 公示投票
PubVote *PublicVote `protobuf:"bytes,5,opt,name=pubVote,proto3" json:"pubVote,omitempty"` PubVote *PublicVote `protobuf:"bytes,5,opt,name=pubVote" json:"pubVote,omitempty"`
// 状态 // 状态
Status int32 `protobuf:"varint,6,opt,name=status,proto3" json:"status,omitempty"` Status int32 `protobuf:"varint,6,opt,name=status" json:"status,omitempty"`
Address string `protobuf:"bytes,7,opt,name=address,proto3" json:"address,omitempty"` Address string `protobuf:"bytes,7,opt,name=address" json:"address,omitempty"`
Height int64 `protobuf:"varint,8,opt,name=height,proto3" json:"height,omitempty"` Height int64 `protobuf:"varint,8,opt,name=height" json:"height,omitempty"`
Index int32 `protobuf:"varint,9,opt,name=index,proto3" json:"index,omitempty"` Index int32 `protobuf:"varint,9,opt,name=index" json:"index,omitempty"`
ProposalID string `protobuf:"bytes,10,opt,name=proposalID,proto3" json:"proposalID,omitempty"` ProposalID string `protobuf:"bytes,10,opt,name=proposalID" json:"proposalID,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *AutonomyProposalProject) Reset() { *m = AutonomyProposalProject{} }
func (m *AutonomyProposalProject) String() string { return proto.CompactTextString(m) }
func (*AutonomyProposalProject) ProtoMessage() {}
func (*AutonomyProposalProject) Descriptor() ([]byte, []int) {
return fileDescriptor_project_56f3f85d427589c6, []int{0}
}
func (m *AutonomyProposalProject) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_AutonomyProposalProject.Unmarshal(m, b)
}
func (m *AutonomyProposalProject) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_AutonomyProposalProject.Marshal(b, m, deterministic)
}
func (dst *AutonomyProposalProject) XXX_Merge(src proto.Message) {
xxx_messageInfo_AutonomyProposalProject.Merge(dst, src)
}
func (m *AutonomyProposalProject) XXX_Size() int {
return xxx_messageInfo_AutonomyProposalProject.Size(m)
}
func (m *AutonomyProposalProject) XXX_DiscardUnknown() {
xxx_messageInfo_AutonomyProposalProject.DiscardUnknown(m)
} }
var xxx_messageInfo_AutonomyProposalProject proto.InternalMessageInfo func (m *AutonomyProposalProject) Reset() { *m = AutonomyProposalProject{} }
func (m *AutonomyProposalProject) String() string { return proto.CompactTextString(m) }
func (*AutonomyProposalProject) ProtoMessage() {}
func (*AutonomyProposalProject) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{0} }
func (m *AutonomyProposalProject) GetPropProject() *ProposalProject { func (m *AutonomyProposalProject) GetPropProject() *ProposalProject {
if m != nil { if m != nil {
...@@ -139,52 +107,30 @@ func (m *AutonomyProposalProject) GetProposalID() string { ...@@ -139,52 +107,30 @@ func (m *AutonomyProposalProject) GetProposalID() string {
type ProposalProject struct { type ProposalProject struct {
// 提案时间 // 提案时间
Year int32 `protobuf:"varint,1,opt,name=year,proto3" json:"year,omitempty"` Year int32 `protobuf:"varint,1,opt,name=year" json:"year,omitempty"`
Month int32 `protobuf:"varint,2,opt,name=month,proto3" json:"month,omitempty"` Month int32 `protobuf:"varint,2,opt,name=month" json:"month,omitempty"`
Day int32 `protobuf:"varint,3,opt,name=day,proto3" json:"day,omitempty"` Day int32 `protobuf:"varint,3,opt,name=day" json:"day,omitempty"`
// 项目相关 // 项目相关
FirstStage string `protobuf:"bytes,4,opt,name=firstStage,proto3" json:"firstStage,omitempty"` FirstStage string `protobuf:"bytes,4,opt,name=firstStage" json:"firstStage,omitempty"`
LastStage string `protobuf:"bytes,5,opt,name=lastStage,proto3" json:"lastStage,omitempty"` LastStage string `protobuf:"bytes,5,opt,name=lastStage" json:"lastStage,omitempty"`
Production string `protobuf:"bytes,6,opt,name=production,proto3" json:"production,omitempty"` Production string `protobuf:"bytes,6,opt,name=production" json:"production,omitempty"`
Description string `protobuf:"bytes,7,opt,name=description,proto3" json:"description,omitempty"` Description string `protobuf:"bytes,7,opt,name=description" json:"description,omitempty"`
Contractor string `protobuf:"bytes,8,opt,name=contractor,proto3" json:"contractor,omitempty"` Contractor string `protobuf:"bytes,8,opt,name=contractor" json:"contractor,omitempty"`
Amount int64 `protobuf:"varint,9,opt,name=amount,proto3" json:"amount,omitempty"` Amount int64 `protobuf:"varint,9,opt,name=amount" json:"amount,omitempty"`
AmountDetail string `protobuf:"bytes,10,opt,name=amountDetail,proto3" json:"amountDetail,omitempty"` AmountDetail string `protobuf:"bytes,10,opt,name=amountDetail" json:"amountDetail,omitempty"`
// 支付相关 // 支付相关
ToAddr string `protobuf:"bytes,11,opt,name=toAddr,proto3" json:"toAddr,omitempty"` ToAddr string `protobuf:"bytes,11,opt,name=toAddr" json:"toAddr,omitempty"`
// 投票相关 // 投票相关
StartBlockHeight int64 `protobuf:"varint,12,opt,name=startBlockHeight,proto3" json:"startBlockHeight,omitempty"` StartBlockHeight int64 `protobuf:"varint,12,opt,name=startBlockHeight" json:"startBlockHeight,omitempty"`
EndBlockHeight int64 `protobuf:"varint,13,opt,name=endBlockHeight,proto3" json:"endBlockHeight,omitempty"` EndBlockHeight int64 `protobuf:"varint,13,opt,name=endBlockHeight" json:"endBlockHeight,omitempty"`
RealEndBlockHeight int64 `protobuf:"varint,14,opt,name=realEndBlockHeight,proto3" json:"realEndBlockHeight,omitempty"` RealEndBlockHeight int64 `protobuf:"varint,14,opt,name=realEndBlockHeight" json:"realEndBlockHeight,omitempty"`
ProjectNeedBlockNum int32 `protobuf:"varint,15,opt,name=projectNeedBlockNum,proto3" json:"projectNeedBlockNum,omitempty"` ProjectNeedBlockNum int32 `protobuf:"varint,15,opt,name=projectNeedBlockNum" json:"projectNeedBlockNum,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
} }
func (m *ProposalProject) Reset() { *m = ProposalProject{} } func (m *ProposalProject) Reset() { *m = ProposalProject{} }
func (m *ProposalProject) String() string { return proto.CompactTextString(m) } func (m *ProposalProject) String() string { return proto.CompactTextString(m) }
func (*ProposalProject) ProtoMessage() {} func (*ProposalProject) ProtoMessage() {}
func (*ProposalProject) Descriptor() ([]byte, []int) { func (*ProposalProject) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{1} }
return fileDescriptor_project_56f3f85d427589c6, []int{1}
}
func (m *ProposalProject) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ProposalProject.Unmarshal(m, b)
}
func (m *ProposalProject) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ProposalProject.Marshal(b, m, deterministic)
}
func (dst *ProposalProject) XXX_Merge(src proto.Message) {
xxx_messageInfo_ProposalProject.Merge(dst, src)
}
func (m *ProposalProject) XXX_Size() int {
return xxx_messageInfo_ProposalProject.Size(m)
}
func (m *ProposalProject) XXX_DiscardUnknown() {
xxx_messageInfo_ProposalProject.DiscardUnknown(m)
}
var xxx_messageInfo_ProposalProject proto.InternalMessageInfo
func (m *ProposalProject) GetYear() int32 { func (m *ProposalProject) GetYear() int32 {
if m != nil { if m != nil {
...@@ -292,35 +238,13 @@ func (m *ProposalProject) GetProjectNeedBlockNum() int32 { ...@@ -292,35 +238,13 @@ func (m *ProposalProject) GetProjectNeedBlockNum() int32 {
} }
type RevokeProposalProject struct { type RevokeProposalProject struct {
ProposalID string `protobuf:"bytes,1,opt,name=proposalID,proto3" json:"proposalID,omitempty"` ProposalID string `protobuf:"bytes,1,opt,name=proposalID" json:"proposalID,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
} }
func (m *RevokeProposalProject) Reset() { *m = RevokeProposalProject{} } func (m *RevokeProposalProject) Reset() { *m = RevokeProposalProject{} }
func (m *RevokeProposalProject) String() string { return proto.CompactTextString(m) } func (m *RevokeProposalProject) String() string { return proto.CompactTextString(m) }
func (*RevokeProposalProject) ProtoMessage() {} func (*RevokeProposalProject) ProtoMessage() {}
func (*RevokeProposalProject) Descriptor() ([]byte, []int) { func (*RevokeProposalProject) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{2} }
return fileDescriptor_project_56f3f85d427589c6, []int{2}
}
func (m *RevokeProposalProject) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_RevokeProposalProject.Unmarshal(m, b)
}
func (m *RevokeProposalProject) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_RevokeProposalProject.Marshal(b, m, deterministic)
}
func (dst *RevokeProposalProject) XXX_Merge(src proto.Message) {
xxx_messageInfo_RevokeProposalProject.Merge(dst, src)
}
func (m *RevokeProposalProject) XXX_Size() int {
return xxx_messageInfo_RevokeProposalProject.Size(m)
}
func (m *RevokeProposalProject) XXX_DiscardUnknown() {
xxx_messageInfo_RevokeProposalProject.DiscardUnknown(m)
}
var xxx_messageInfo_RevokeProposalProject proto.InternalMessageInfo
func (m *RevokeProposalProject) GetProposalID() string { func (m *RevokeProposalProject) GetProposalID() string {
if m != nil { if m != nil {
...@@ -330,36 +254,14 @@ func (m *RevokeProposalProject) GetProposalID() string { ...@@ -330,36 +254,14 @@ func (m *RevokeProposalProject) GetProposalID() string {
} }
type VoteProposalProject struct { type VoteProposalProject struct {
ProposalID string `protobuf:"bytes,1,opt,name=proposalID,proto3" json:"proposalID,omitempty"` ProposalID string `protobuf:"bytes,1,opt,name=proposalID" json:"proposalID,omitempty"`
Approve bool `protobuf:"varint,2,opt,name=approve,proto3" json:"approve,omitempty"` Approve bool `protobuf:"varint,2,opt,name=approve" json:"approve,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *VoteProposalProject) Reset() { *m = VoteProposalProject{} }
func (m *VoteProposalProject) String() string { return proto.CompactTextString(m) }
func (*VoteProposalProject) ProtoMessage() {}
func (*VoteProposalProject) Descriptor() ([]byte, []int) {
return fileDescriptor_project_56f3f85d427589c6, []int{3}
}
func (m *VoteProposalProject) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_VoteProposalProject.Unmarshal(m, b)
}
func (m *VoteProposalProject) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_VoteProposalProject.Marshal(b, m, deterministic)
}
func (dst *VoteProposalProject) XXX_Merge(src proto.Message) {
xxx_messageInfo_VoteProposalProject.Merge(dst, src)
}
func (m *VoteProposalProject) XXX_Size() int {
return xxx_messageInfo_VoteProposalProject.Size(m)
}
func (m *VoteProposalProject) XXX_DiscardUnknown() {
xxx_messageInfo_VoteProposalProject.DiscardUnknown(m)
} }
var xxx_messageInfo_VoteProposalProject proto.InternalMessageInfo func (m *VoteProposalProject) Reset() { *m = VoteProposalProject{} }
func (m *VoteProposalProject) String() string { return proto.CompactTextString(m) }
func (*VoteProposalProject) ProtoMessage() {}
func (*VoteProposalProject) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{3} }
func (m *VoteProposalProject) GetProposalID() string { func (m *VoteProposalProject) GetProposalID() string {
if m != nil { if m != nil {
...@@ -376,37 +278,15 @@ func (m *VoteProposalProject) GetApprove() bool { ...@@ -376,37 +278,15 @@ func (m *VoteProposalProject) GetApprove() bool {
} }
type PubVoteProposalProject struct { type PubVoteProposalProject struct {
ProposalID string `protobuf:"bytes,1,opt,name=proposalID,proto3" json:"proposalID,omitempty"` ProposalID string `protobuf:"bytes,1,opt,name=proposalID" json:"proposalID,omitempty"`
Oppose bool `protobuf:"varint,2,opt,name=oppose,proto3" json:"oppose,omitempty"` Oppose bool `protobuf:"varint,2,opt,name=oppose" json:"oppose,omitempty"`
OriginAddr []string `protobuf:"bytes,3,rep,name=originAddr,proto3" json:"originAddr,omitempty"` OriginAddr []string `protobuf:"bytes,3,rep,name=originAddr" json:"originAddr,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
} }
func (m *PubVoteProposalProject) Reset() { *m = PubVoteProposalProject{} } func (m *PubVoteProposalProject) Reset() { *m = PubVoteProposalProject{} }
func (m *PubVoteProposalProject) String() string { return proto.CompactTextString(m) } func (m *PubVoteProposalProject) String() string { return proto.CompactTextString(m) }
func (*PubVoteProposalProject) ProtoMessage() {} func (*PubVoteProposalProject) ProtoMessage() {}
func (*PubVoteProposalProject) Descriptor() ([]byte, []int) { func (*PubVoteProposalProject) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{4} }
return fileDescriptor_project_56f3f85d427589c6, []int{4}
}
func (m *PubVoteProposalProject) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_PubVoteProposalProject.Unmarshal(m, b)
}
func (m *PubVoteProposalProject) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_PubVoteProposalProject.Marshal(b, m, deterministic)
}
func (dst *PubVoteProposalProject) XXX_Merge(src proto.Message) {
xxx_messageInfo_PubVoteProposalProject.Merge(dst, src)
}
func (m *PubVoteProposalProject) XXX_Size() int {
return xxx_messageInfo_PubVoteProposalProject.Size(m)
}
func (m *PubVoteProposalProject) XXX_DiscardUnknown() {
xxx_messageInfo_PubVoteProposalProject.DiscardUnknown(m)
}
var xxx_messageInfo_PubVoteProposalProject proto.InternalMessageInfo
func (m *PubVoteProposalProject) GetProposalID() string { func (m *PubVoteProposalProject) GetProposalID() string {
if m != nil { if m != nil {
...@@ -430,35 +310,13 @@ func (m *PubVoteProposalProject) GetOriginAddr() []string { ...@@ -430,35 +310,13 @@ func (m *PubVoteProposalProject) GetOriginAddr() []string {
} }
type TerminateProposalProject struct { type TerminateProposalProject struct {
ProposalID string `protobuf:"bytes,1,opt,name=proposalID,proto3" json:"proposalID,omitempty"` ProposalID string `protobuf:"bytes,1,opt,name=proposalID" json:"proposalID,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
} }
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) { func (*TerminateProposalProject) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{5} }
return fileDescriptor_project_56f3f85d427589c6, []int{5}
}
func (m *TerminateProposalProject) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TerminateProposalProject.Unmarshal(m, b)
}
func (m *TerminateProposalProject) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_TerminateProposalProject.Marshal(b, m, deterministic)
}
func (dst *TerminateProposalProject) XXX_Merge(src proto.Message) {
xxx_messageInfo_TerminateProposalProject.Merge(dst, src)
}
func (m *TerminateProposalProject) XXX_Size() int {
return xxx_messageInfo_TerminateProposalProject.Size(m)
}
func (m *TerminateProposalProject) XXX_DiscardUnknown() {
xxx_messageInfo_TerminateProposalProject.DiscardUnknown(m)
}
var xxx_messageInfo_TerminateProposalProject proto.InternalMessageInfo
func (m *TerminateProposalProject) GetProposalID() string { func (m *TerminateProposalProject) GetProposalID() string {
if m != nil { if m != nil {
...@@ -469,36 +327,14 @@ func (m *TerminateProposalProject) GetProposalID() string { ...@@ -469,36 +327,14 @@ func (m *TerminateProposalProject) GetProposalID() string {
// receipt // receipt
type ReceiptProposalProject struct { type ReceiptProposalProject struct {
Prev *AutonomyProposalProject `protobuf:"bytes,1,opt,name=prev,proto3" json:"prev,omitempty"` Prev *AutonomyProposalProject `protobuf:"bytes,1,opt,name=prev" json:"prev,omitempty"`
Current *AutonomyProposalProject `protobuf:"bytes,2,opt,name=current,proto3" json:"current,omitempty"` Current *AutonomyProposalProject `protobuf:"bytes,2,opt,name=current" json:"current,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ReceiptProposalProject) Reset() { *m = ReceiptProposalProject{} }
func (m *ReceiptProposalProject) String() string { return proto.CompactTextString(m) }
func (*ReceiptProposalProject) ProtoMessage() {}
func (*ReceiptProposalProject) Descriptor() ([]byte, []int) {
return fileDescriptor_project_56f3f85d427589c6, []int{6}
}
func (m *ReceiptProposalProject) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ReceiptProposalProject.Unmarshal(m, b)
}
func (m *ReceiptProposalProject) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ReceiptProposalProject.Marshal(b, m, deterministic)
}
func (dst *ReceiptProposalProject) XXX_Merge(src proto.Message) {
xxx_messageInfo_ReceiptProposalProject.Merge(dst, src)
}
func (m *ReceiptProposalProject) XXX_Size() int {
return xxx_messageInfo_ReceiptProposalProject.Size(m)
}
func (m *ReceiptProposalProject) XXX_DiscardUnknown() {
xxx_messageInfo_ReceiptProposalProject.DiscardUnknown(m)
} }
var xxx_messageInfo_ReceiptProposalProject proto.InternalMessageInfo func (m *ReceiptProposalProject) Reset() { *m = ReceiptProposalProject{} }
func (m *ReceiptProposalProject) String() string { return proto.CompactTextString(m) }
func (*ReceiptProposalProject) ProtoMessage() {}
func (*ReceiptProposalProject) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{6} }
func (m *ReceiptProposalProject) GetPrev() *AutonomyProposalProject { func (m *ReceiptProposalProject) GetPrev() *AutonomyProposalProject {
if m != nil { if m != nil {
...@@ -515,36 +351,14 @@ func (m *ReceiptProposalProject) GetCurrent() *AutonomyProposalProject { ...@@ -515,36 +351,14 @@ func (m *ReceiptProposalProject) GetCurrent() *AutonomyProposalProject {
} }
type LocalProposalProject struct { type LocalProposalProject struct {
PropPrj *AutonomyProposalProject `protobuf:"bytes,1,opt,name=propPrj,proto3" json:"propPrj,omitempty"` PropPrj *AutonomyProposalProject `protobuf:"bytes,1,opt,name=propPrj" json:"propPrj,omitempty"`
Comments []string `protobuf:"bytes,2,rep,name=comments,proto3" json:"comments,omitempty"` Comments []string `protobuf:"bytes,2,rep,name=comments" json:"comments,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *LocalProposalProject) Reset() { *m = LocalProposalProject{} }
func (m *LocalProposalProject) String() string { return proto.CompactTextString(m) }
func (*LocalProposalProject) ProtoMessage() {}
func (*LocalProposalProject) Descriptor() ([]byte, []int) {
return fileDescriptor_project_56f3f85d427589c6, []int{7}
}
func (m *LocalProposalProject) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_LocalProposalProject.Unmarshal(m, b)
}
func (m *LocalProposalProject) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_LocalProposalProject.Marshal(b, m, deterministic)
}
func (dst *LocalProposalProject) XXX_Merge(src proto.Message) {
xxx_messageInfo_LocalProposalProject.Merge(dst, src)
}
func (m *LocalProposalProject) XXX_Size() int {
return xxx_messageInfo_LocalProposalProject.Size(m)
}
func (m *LocalProposalProject) XXX_DiscardUnknown() {
xxx_messageInfo_LocalProposalProject.DiscardUnknown(m)
} }
var xxx_messageInfo_LocalProposalProject proto.InternalMessageInfo func (m *LocalProposalProject) Reset() { *m = LocalProposalProject{} }
func (m *LocalProposalProject) String() string { return proto.CompactTextString(m) }
func (*LocalProposalProject) ProtoMessage() {}
func (*LocalProposalProject) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{7} }
func (m *LocalProposalProject) GetPropPrj() *AutonomyProposalProject { func (m *LocalProposalProject) GetPropPrj() *AutonomyProposalProject {
if m != nil { if m != nil {
...@@ -562,40 +376,18 @@ func (m *LocalProposalProject) GetComments() []string { ...@@ -562,40 +376,18 @@ func (m *LocalProposalProject) GetComments() []string {
// query // query
type ReqQueryProposalProject struct { type ReqQueryProposalProject struct {
Status int32 `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"` Status int32 `protobuf:"varint,1,opt,name=status" json:"status,omitempty"`
Addr string `protobuf:"bytes,2,opt,name=addr,proto3" json:"addr,omitempty"` Addr string `protobuf:"bytes,2,opt,name=addr" json:"addr,omitempty"`
Count int32 `protobuf:"varint,3,opt,name=count,proto3" json:"count,omitempty"` Count int32 `protobuf:"varint,3,opt,name=count" json:"count,omitempty"`
Direction int32 `protobuf:"varint,4,opt,name=direction,proto3" json:"direction,omitempty"` Direction int32 `protobuf:"varint,4,opt,name=direction" json:"direction,omitempty"`
Height int64 `protobuf:"varint,5,opt,name=height,proto3" json:"height,omitempty"` Height int64 `protobuf:"varint,5,opt,name=height" json:"height,omitempty"`
Index int32 `protobuf:"varint,6,opt,name=index,proto3" json:"index,omitempty"` Index int32 `protobuf:"varint,6,opt,name=index" json:"index,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ReqQueryProposalProject) Reset() { *m = ReqQueryProposalProject{} }
func (m *ReqQueryProposalProject) String() string { return proto.CompactTextString(m) }
func (*ReqQueryProposalProject) ProtoMessage() {}
func (*ReqQueryProposalProject) Descriptor() ([]byte, []int) {
return fileDescriptor_project_56f3f85d427589c6, []int{8}
}
func (m *ReqQueryProposalProject) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ReqQueryProposalProject.Unmarshal(m, b)
}
func (m *ReqQueryProposalProject) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ReqQueryProposalProject.Marshal(b, m, deterministic)
}
func (dst *ReqQueryProposalProject) XXX_Merge(src proto.Message) {
xxx_messageInfo_ReqQueryProposalProject.Merge(dst, src)
}
func (m *ReqQueryProposalProject) XXX_Size() int {
return xxx_messageInfo_ReqQueryProposalProject.Size(m)
}
func (m *ReqQueryProposalProject) XXX_DiscardUnknown() {
xxx_messageInfo_ReqQueryProposalProject.DiscardUnknown(m)
} }
var xxx_messageInfo_ReqQueryProposalProject proto.InternalMessageInfo func (m *ReqQueryProposalProject) Reset() { *m = ReqQueryProposalProject{} }
func (m *ReqQueryProposalProject) String() string { return proto.CompactTextString(m) }
func (*ReqQueryProposalProject) ProtoMessage() {}
func (*ReqQueryProposalProject) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{8} }
func (m *ReqQueryProposalProject) GetStatus() int32 { func (m *ReqQueryProposalProject) GetStatus() int32 {
if m != nil { if m != nil {
...@@ -640,35 +432,13 @@ func (m *ReqQueryProposalProject) GetIndex() int32 { ...@@ -640,35 +432,13 @@ func (m *ReqQueryProposalProject) GetIndex() int32 {
} }
type ReplyQueryProposalProject struct { type ReplyQueryProposalProject struct {
PropProjects []*AutonomyProposalProject `protobuf:"bytes,1,rep,name=propProjects,proto3" json:"propProjects,omitempty"` PropProjects []*AutonomyProposalProject `protobuf:"bytes,1,rep,name=propProjects" json:"propProjects,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ReplyQueryProposalProject) Reset() { *m = ReplyQueryProposalProject{} }
func (m *ReplyQueryProposalProject) String() string { return proto.CompactTextString(m) }
func (*ReplyQueryProposalProject) ProtoMessage() {}
func (*ReplyQueryProposalProject) Descriptor() ([]byte, []int) {
return fileDescriptor_project_56f3f85d427589c6, []int{9}
}
func (m *ReplyQueryProposalProject) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ReplyQueryProposalProject.Unmarshal(m, b)
}
func (m *ReplyQueryProposalProject) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ReplyQueryProposalProject.Marshal(b, m, deterministic)
}
func (dst *ReplyQueryProposalProject) XXX_Merge(src proto.Message) {
xxx_messageInfo_ReplyQueryProposalProject.Merge(dst, src)
}
func (m *ReplyQueryProposalProject) XXX_Size() int {
return xxx_messageInfo_ReplyQueryProposalProject.Size(m)
}
func (m *ReplyQueryProposalProject) XXX_DiscardUnknown() {
xxx_messageInfo_ReplyQueryProposalProject.DiscardUnknown(m)
} }
var xxx_messageInfo_ReplyQueryProposalProject proto.InternalMessageInfo func (m *ReplyQueryProposalProject) Reset() { *m = ReplyQueryProposalProject{} }
func (m *ReplyQueryProposalProject) String() string { return proto.CompactTextString(m) }
func (*ReplyQueryProposalProject) ProtoMessage() {}
func (*ReplyQueryProposalProject) Descriptor() ([]byte, []int) { return fileDescriptor4, []int{9} }
func (m *ReplyQueryProposalProject) GetPropProjects() []*AutonomyProposalProject { func (m *ReplyQueryProposalProject) GetPropProjects() []*AutonomyProposalProject {
if m != nil { if m != nil {
...@@ -690,9 +460,9 @@ func init() { ...@@ -690,9 +460,9 @@ func init() {
proto.RegisterType((*ReplyQueryProposalProject)(nil), "types.ReplyQueryProposalProject") proto.RegisterType((*ReplyQueryProposalProject)(nil), "types.ReplyQueryProposalProject")
} }
func init() { proto.RegisterFile("project.proto", fileDescriptor_project_56f3f85d427589c6) } func init() { proto.RegisterFile("project.proto", fileDescriptor4) }
var fileDescriptor_project_56f3f85d427589c6 = []byte{ var fileDescriptor4 = []byte{
// 713 bytes of a gzipped FileDescriptorProto // 713 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x55, 0x5f, 0x6f, 0xd3, 0x3e, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x55, 0x5f, 0x6f, 0xd3, 0x3e,
0x14, 0x55, 0x96, 0xa6, 0x5d, 0x6f, 0xbb, 0x3f, 0x3f, 0x6f, 0xbf, 0xce, 0x4c, 0x68, 0xaa, 0xf2, 0x14, 0x55, 0x96, 0xa6, 0x5d, 0x6f, 0xbb, 0x3f, 0x3f, 0x6f, 0xbf, 0xce, 0x4c, 0x68, 0xaa, 0xf2,
......
...@@ -3,64 +3,32 @@ ...@@ -3,64 +3,32 @@
package types package types
import ( import proto "github.com/golang/protobuf/proto"
fmt "fmt" import fmt "fmt"
import math "math"
proto "github.com/golang/protobuf/proto"
math "math"
)
// Reference imports to suppress errors if they are not otherwise used. // Reference imports to suppress errors if they are not otherwise used.
var _ = proto.Marshal var _ = proto.Marshal
var _ = fmt.Errorf var _ = fmt.Errorf
var _ = math.Inf var _ = math.Inf
// This is a compile-time assertion to ensure that this generated file
// is compatible with the proto package it is being compiled against.
// A compilation error at this line likely means your copy of the
// proto package needs to be updated.
const _ = proto.ProtoPackageIsVersion2 // please upgrade the proto package
type AutonomyProposalRule struct { type AutonomyProposalRule struct {
PropRule *ProposalRule `protobuf:"bytes,1,opt,name=propRule,proto3" json:"propRule,omitempty"` PropRule *ProposalRule `protobuf:"bytes,1,opt,name=propRule" json:"propRule,omitempty"`
CurRule *RuleConfig `protobuf:"bytes,2,opt,name=curRule,proto3" json:"curRule,omitempty"` CurRule *RuleConfig `protobuf:"bytes,2,opt,name=curRule" json:"curRule,omitempty"`
// 全体持票人投票结果 // 全体持票人投票结果
VoteResult *VoteResult `protobuf:"bytes,3,opt,name=voteResult,proto3" json:"voteResult,omitempty"` VoteResult *VoteResult `protobuf:"bytes,3,opt,name=voteResult" json:"voteResult,omitempty"`
// 状态 // 状态
Status int32 `protobuf:"varint,4,opt,name=status,proto3" json:"status,omitempty"` Status int32 `protobuf:"varint,4,opt,name=status" json:"status,omitempty"`
Address string `protobuf:"bytes,5,opt,name=address,proto3" json:"address,omitempty"` Address string `protobuf:"bytes,5,opt,name=address" json:"address,omitempty"`
Height int64 `protobuf:"varint,6,opt,name=height,proto3" json:"height,omitempty"` Height int64 `protobuf:"varint,6,opt,name=height" json:"height,omitempty"`
Index int32 `protobuf:"varint,7,opt,name=index,proto3" json:"index,omitempty"` Index int32 `protobuf:"varint,7,opt,name=index" json:"index,omitempty"`
ProposalID string `protobuf:"bytes,8,opt,name=proposalID,proto3" json:"proposalID,omitempty"` ProposalID string `protobuf:"bytes,8,opt,name=proposalID" json:"proposalID,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *AutonomyProposalRule) Reset() { *m = AutonomyProposalRule{} }
func (m *AutonomyProposalRule) String() string { return proto.CompactTextString(m) }
func (*AutonomyProposalRule) ProtoMessage() {}
func (*AutonomyProposalRule) Descriptor() ([]byte, []int) {
return fileDescriptor_rule_2ed9cd03418a949e, []int{0}
}
func (m *AutonomyProposalRule) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_AutonomyProposalRule.Unmarshal(m, b)
}
func (m *AutonomyProposalRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_AutonomyProposalRule.Marshal(b, m, deterministic)
}
func (dst *AutonomyProposalRule) XXX_Merge(src proto.Message) {
xxx_messageInfo_AutonomyProposalRule.Merge(dst, src)
}
func (m *AutonomyProposalRule) XXX_Size() int {
return xxx_messageInfo_AutonomyProposalRule.Size(m)
}
func (m *AutonomyProposalRule) XXX_DiscardUnknown() {
xxx_messageInfo_AutonomyProposalRule.DiscardUnknown(m)
} }
var xxx_messageInfo_AutonomyProposalRule proto.InternalMessageInfo func (m *AutonomyProposalRule) Reset() { *m = AutonomyProposalRule{} }
func (m *AutonomyProposalRule) String() string { return proto.CompactTextString(m) }
func (*AutonomyProposalRule) ProtoMessage() {}
func (*AutonomyProposalRule) Descriptor() ([]byte, []int) { return fileDescriptor5, []int{0} }
func (m *AutonomyProposalRule) GetPropRule() *ProposalRule { func (m *AutonomyProposalRule) GetPropRule() *ProposalRule {
if m != nil { if m != nil {
...@@ -120,43 +88,21 @@ func (m *AutonomyProposalRule) GetProposalID() string { ...@@ -120,43 +88,21 @@ func (m *AutonomyProposalRule) GetProposalID() string {
type ProposalRule struct { type ProposalRule struct {
// 提案时间 // 提案时间
Year int32 `protobuf:"varint,1,opt,name=year,proto3" json:"year,omitempty"` Year int32 `protobuf:"varint,1,opt,name=year" json:"year,omitempty"`
Month int32 `protobuf:"varint,2,opt,name=month,proto3" json:"month,omitempty"` Month int32 `protobuf:"varint,2,opt,name=month" json:"month,omitempty"`
Day int32 `protobuf:"varint,3,opt,name=day,proto3" json:"day,omitempty"` Day int32 `protobuf:"varint,3,opt,name=day" json:"day,omitempty"`
// 规则可修改项,如果某项不修改则置为-1 // 规则可修改项,如果某项不修改则置为-1
RuleCfg *RuleConfig `protobuf:"bytes,4,opt,name=ruleCfg,proto3" json:"ruleCfg,omitempty"` RuleCfg *RuleConfig `protobuf:"bytes,4,opt,name=ruleCfg" json:"ruleCfg,omitempty"`
// 投票相关 // 投票相关
StartBlockHeight int64 `protobuf:"varint,5,opt,name=startBlockHeight,proto3" json:"startBlockHeight,omitempty"` StartBlockHeight int64 `protobuf:"varint,5,opt,name=startBlockHeight" json:"startBlockHeight,omitempty"`
EndBlockHeight int64 `protobuf:"varint,6,opt,name=endBlockHeight,proto3" json:"endBlockHeight,omitempty"` EndBlockHeight int64 `protobuf:"varint,6,opt,name=endBlockHeight" json:"endBlockHeight,omitempty"`
RealEndBlockHeight int64 `protobuf:"varint,7,opt,name=realEndBlockHeight,proto3" json:"realEndBlockHeight,omitempty"` RealEndBlockHeight int64 `protobuf:"varint,7,opt,name=realEndBlockHeight" json:"realEndBlockHeight,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
} }
func (m *ProposalRule) Reset() { *m = ProposalRule{} } func (m *ProposalRule) Reset() { *m = ProposalRule{} }
func (m *ProposalRule) String() string { return proto.CompactTextString(m) } func (m *ProposalRule) String() string { return proto.CompactTextString(m) }
func (*ProposalRule) ProtoMessage() {} func (*ProposalRule) ProtoMessage() {}
func (*ProposalRule) Descriptor() ([]byte, []int) { func (*ProposalRule) Descriptor() ([]byte, []int) { return fileDescriptor5, []int{1} }
return fileDescriptor_rule_2ed9cd03418a949e, []int{1}
}
func (m *ProposalRule) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ProposalRule.Unmarshal(m, b)
}
func (m *ProposalRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ProposalRule.Marshal(b, m, deterministic)
}
func (dst *ProposalRule) XXX_Merge(src proto.Message) {
xxx_messageInfo_ProposalRule.Merge(dst, src)
}
func (m *ProposalRule) XXX_Size() int {
return xxx_messageInfo_ProposalRule.Size(m)
}
func (m *ProposalRule) XXX_DiscardUnknown() {
xxx_messageInfo_ProposalRule.DiscardUnknown(m)
}
var xxx_messageInfo_ProposalRule proto.InternalMessageInfo
func (m *ProposalRule) GetYear() int32 { func (m *ProposalRule) GetYear() int32 {
if m != nil { if m != nil {
...@@ -208,35 +154,13 @@ func (m *ProposalRule) GetRealEndBlockHeight() int64 { ...@@ -208,35 +154,13 @@ func (m *ProposalRule) GetRealEndBlockHeight() int64 {
} }
type RevokeProposalRule struct { type RevokeProposalRule struct {
ProposalID string `protobuf:"bytes,1,opt,name=proposalID,proto3" json:"proposalID,omitempty"` ProposalID string `protobuf:"bytes,1,opt,name=proposalID" json:"proposalID,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
} }
func (m *RevokeProposalRule) Reset() { *m = RevokeProposalRule{} } func (m *RevokeProposalRule) Reset() { *m = RevokeProposalRule{} }
func (m *RevokeProposalRule) String() string { return proto.CompactTextString(m) } func (m *RevokeProposalRule) String() string { return proto.CompactTextString(m) }
func (*RevokeProposalRule) ProtoMessage() {} func (*RevokeProposalRule) ProtoMessage() {}
func (*RevokeProposalRule) Descriptor() ([]byte, []int) { func (*RevokeProposalRule) Descriptor() ([]byte, []int) { return fileDescriptor5, []int{2} }
return fileDescriptor_rule_2ed9cd03418a949e, []int{2}
}
func (m *RevokeProposalRule) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_RevokeProposalRule.Unmarshal(m, b)
}
func (m *RevokeProposalRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_RevokeProposalRule.Marshal(b, m, deterministic)
}
func (dst *RevokeProposalRule) XXX_Merge(src proto.Message) {
xxx_messageInfo_RevokeProposalRule.Merge(dst, src)
}
func (m *RevokeProposalRule) XXX_Size() int {
return xxx_messageInfo_RevokeProposalRule.Size(m)
}
func (m *RevokeProposalRule) XXX_DiscardUnknown() {
xxx_messageInfo_RevokeProposalRule.DiscardUnknown(m)
}
var xxx_messageInfo_RevokeProposalRule proto.InternalMessageInfo
func (m *RevokeProposalRule) GetProposalID() string { func (m *RevokeProposalRule) GetProposalID() string {
if m != nil { if m != nil {
...@@ -246,37 +170,15 @@ func (m *RevokeProposalRule) GetProposalID() string { ...@@ -246,37 +170,15 @@ func (m *RevokeProposalRule) GetProposalID() string {
} }
type VoteProposalRule struct { type VoteProposalRule struct {
ProposalID string `protobuf:"bytes,1,opt,name=proposalID,proto3" json:"proposalID,omitempty"` ProposalID string `protobuf:"bytes,1,opt,name=proposalID" json:"proposalID,omitempty"`
Approve bool `protobuf:"varint,2,opt,name=approve,proto3" json:"approve,omitempty"` Approve bool `protobuf:"varint,2,opt,name=approve" json:"approve,omitempty"`
OriginAddr []string `protobuf:"bytes,3,rep,name=originAddr,proto3" json:"originAddr,omitempty"` OriginAddr []string `protobuf:"bytes,3,rep,name=originAddr" json:"originAddr,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *VoteProposalRule) Reset() { *m = VoteProposalRule{} }
func (m *VoteProposalRule) String() string { return proto.CompactTextString(m) }
func (*VoteProposalRule) ProtoMessage() {}
func (*VoteProposalRule) Descriptor() ([]byte, []int) {
return fileDescriptor_rule_2ed9cd03418a949e, []int{3}
}
func (m *VoteProposalRule) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_VoteProposalRule.Unmarshal(m, b)
}
func (m *VoteProposalRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_VoteProposalRule.Marshal(b, m, deterministic)
}
func (dst *VoteProposalRule) XXX_Merge(src proto.Message) {
xxx_messageInfo_VoteProposalRule.Merge(dst, src)
}
func (m *VoteProposalRule) XXX_Size() int {
return xxx_messageInfo_VoteProposalRule.Size(m)
}
func (m *VoteProposalRule) XXX_DiscardUnknown() {
xxx_messageInfo_VoteProposalRule.DiscardUnknown(m)
} }
var xxx_messageInfo_VoteProposalRule proto.InternalMessageInfo func (m *VoteProposalRule) Reset() { *m = VoteProposalRule{} }
func (m *VoteProposalRule) String() string { return proto.CompactTextString(m) }
func (*VoteProposalRule) ProtoMessage() {}
func (*VoteProposalRule) Descriptor() ([]byte, []int) { return fileDescriptor5, []int{3} }
func (m *VoteProposalRule) GetProposalID() string { func (m *VoteProposalRule) GetProposalID() string {
if m != nil { if m != nil {
...@@ -300,35 +202,13 @@ func (m *VoteProposalRule) GetOriginAddr() []string { ...@@ -300,35 +202,13 @@ func (m *VoteProposalRule) GetOriginAddr() []string {
} }
type TerminateProposalRule struct { type TerminateProposalRule struct {
ProposalID string `protobuf:"bytes,1,opt,name=proposalID,proto3" json:"proposalID,omitempty"` ProposalID string `protobuf:"bytes,1,opt,name=proposalID" json:"proposalID,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *TerminateProposalRule) Reset() { *m = TerminateProposalRule{} }
func (m *TerminateProposalRule) String() string { return proto.CompactTextString(m) }
func (*TerminateProposalRule) ProtoMessage() {}
func (*TerminateProposalRule) Descriptor() ([]byte, []int) {
return fileDescriptor_rule_2ed9cd03418a949e, []int{4}
}
func (m *TerminateProposalRule) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TerminateProposalRule.Unmarshal(m, b)
}
func (m *TerminateProposalRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_TerminateProposalRule.Marshal(b, m, deterministic)
}
func (dst *TerminateProposalRule) XXX_Merge(src proto.Message) {
xxx_messageInfo_TerminateProposalRule.Merge(dst, src)
}
func (m *TerminateProposalRule) XXX_Size() int {
return xxx_messageInfo_TerminateProposalRule.Size(m)
}
func (m *TerminateProposalRule) XXX_DiscardUnknown() {
xxx_messageInfo_TerminateProposalRule.DiscardUnknown(m)
} }
var xxx_messageInfo_TerminateProposalRule proto.InternalMessageInfo func (m *TerminateProposalRule) Reset() { *m = TerminateProposalRule{} }
func (m *TerminateProposalRule) String() string { return proto.CompactTextString(m) }
func (*TerminateProposalRule) ProtoMessage() {}
func (*TerminateProposalRule) Descriptor() ([]byte, []int) { return fileDescriptor5, []int{4} }
func (m *TerminateProposalRule) GetProposalID() string { func (m *TerminateProposalRule) GetProposalID() string {
if m != nil { if m != nil {
...@@ -339,36 +219,14 @@ func (m *TerminateProposalRule) GetProposalID() string { ...@@ -339,36 +219,14 @@ func (m *TerminateProposalRule) GetProposalID() string {
// receipt // receipt
type ReceiptProposalRule struct { type ReceiptProposalRule struct {
Prev *AutonomyProposalRule `protobuf:"bytes,1,opt,name=prev,proto3" json:"prev,omitempty"` Prev *AutonomyProposalRule `protobuf:"bytes,1,opt,name=prev" json:"prev,omitempty"`
Current *AutonomyProposalRule `protobuf:"bytes,2,opt,name=current,proto3" json:"current,omitempty"` Current *AutonomyProposalRule `protobuf:"bytes,2,opt,name=current" json:"current,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
} }
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) { func (*ReceiptProposalRule) Descriptor() ([]byte, []int) { return fileDescriptor5, []int{5} }
return fileDescriptor_rule_2ed9cd03418a949e, []int{5}
}
func (m *ReceiptProposalRule) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ReceiptProposalRule.Unmarshal(m, b)
}
func (m *ReceiptProposalRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ReceiptProposalRule.Marshal(b, m, deterministic)
}
func (dst *ReceiptProposalRule) XXX_Merge(src proto.Message) {
xxx_messageInfo_ReceiptProposalRule.Merge(dst, src)
}
func (m *ReceiptProposalRule) XXX_Size() int {
return xxx_messageInfo_ReceiptProposalRule.Size(m)
}
func (m *ReceiptProposalRule) XXX_DiscardUnknown() {
xxx_messageInfo_ReceiptProposalRule.DiscardUnknown(m)
}
var xxx_messageInfo_ReceiptProposalRule proto.InternalMessageInfo
func (m *ReceiptProposalRule) GetPrev() *AutonomyProposalRule { func (m *ReceiptProposalRule) GetPrev() *AutonomyProposalRule {
if m != nil { if m != nil {
...@@ -385,36 +243,14 @@ func (m *ReceiptProposalRule) GetCurrent() *AutonomyProposalRule { ...@@ -385,36 +243,14 @@ func (m *ReceiptProposalRule) GetCurrent() *AutonomyProposalRule {
} }
type LocalProposalRule struct { type LocalProposalRule struct {
PropRule *AutonomyProposalRule `protobuf:"bytes,1,opt,name=propRule,proto3" json:"propRule,omitempty"` PropRule *AutonomyProposalRule `protobuf:"bytes,1,opt,name=propRule" json:"propRule,omitempty"`
Comments []string `protobuf:"bytes,2,rep,name=comments,proto3" json:"comments,omitempty"` Comments []string `protobuf:"bytes,2,rep,name=comments" json:"comments,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
} }
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) { func (*LocalProposalRule) Descriptor() ([]byte, []int) { return fileDescriptor5, []int{6} }
return fileDescriptor_rule_2ed9cd03418a949e, []int{6}
}
func (m *LocalProposalRule) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_LocalProposalRule.Unmarshal(m, b)
}
func (m *LocalProposalRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_LocalProposalRule.Marshal(b, m, deterministic)
}
func (dst *LocalProposalRule) XXX_Merge(src proto.Message) {
xxx_messageInfo_LocalProposalRule.Merge(dst, src)
}
func (m *LocalProposalRule) XXX_Size() int {
return xxx_messageInfo_LocalProposalRule.Size(m)
}
func (m *LocalProposalRule) XXX_DiscardUnknown() {
xxx_messageInfo_LocalProposalRule.DiscardUnknown(m)
}
var xxx_messageInfo_LocalProposalRule proto.InternalMessageInfo
func (m *LocalProposalRule) GetPropRule() *AutonomyProposalRule { func (m *LocalProposalRule) GetPropRule() *AutonomyProposalRule {
if m != nil { if m != nil {
...@@ -432,40 +268,18 @@ func (m *LocalProposalRule) GetComments() []string { ...@@ -432,40 +268,18 @@ func (m *LocalProposalRule) GetComments() []string {
// query // query
type ReqQueryProposalRule struct { type ReqQueryProposalRule struct {
Status int32 `protobuf:"varint,1,opt,name=status,proto3" json:"status,omitempty"` Status int32 `protobuf:"varint,1,opt,name=status" json:"status,omitempty"`
Addr string `protobuf:"bytes,2,opt,name=addr,proto3" json:"addr,omitempty"` Addr string `protobuf:"bytes,2,opt,name=addr" json:"addr,omitempty"`
Count int32 `protobuf:"varint,3,opt,name=count,proto3" json:"count,omitempty"` Count int32 `protobuf:"varint,3,opt,name=count" json:"count,omitempty"`
Direction int32 `protobuf:"varint,4,opt,name=direction,proto3" json:"direction,omitempty"` Direction int32 `protobuf:"varint,4,opt,name=direction" json:"direction,omitempty"`
Height int64 `protobuf:"varint,5,opt,name=height,proto3" json:"height,omitempty"` Height int64 `protobuf:"varint,5,opt,name=height" json:"height,omitempty"`
Index int32 `protobuf:"varint,6,opt,name=index,proto3" json:"index,omitempty"` Index int32 `protobuf:"varint,6,opt,name=index" json:"index,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ReqQueryProposalRule) Reset() { *m = ReqQueryProposalRule{} }
func (m *ReqQueryProposalRule) String() string { return proto.CompactTextString(m) }
func (*ReqQueryProposalRule) ProtoMessage() {}
func (*ReqQueryProposalRule) Descriptor() ([]byte, []int) {
return fileDescriptor_rule_2ed9cd03418a949e, []int{7}
}
func (m *ReqQueryProposalRule) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ReqQueryProposalRule.Unmarshal(m, b)
}
func (m *ReqQueryProposalRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ReqQueryProposalRule.Marshal(b, m, deterministic)
}
func (dst *ReqQueryProposalRule) XXX_Merge(src proto.Message) {
xxx_messageInfo_ReqQueryProposalRule.Merge(dst, src)
}
func (m *ReqQueryProposalRule) XXX_Size() int {
return xxx_messageInfo_ReqQueryProposalRule.Size(m)
}
func (m *ReqQueryProposalRule) XXX_DiscardUnknown() {
xxx_messageInfo_ReqQueryProposalRule.DiscardUnknown(m)
} }
var xxx_messageInfo_ReqQueryProposalRule proto.InternalMessageInfo func (m *ReqQueryProposalRule) Reset() { *m = ReqQueryProposalRule{} }
func (m *ReqQueryProposalRule) String() string { return proto.CompactTextString(m) }
func (*ReqQueryProposalRule) ProtoMessage() {}
func (*ReqQueryProposalRule) Descriptor() ([]byte, []int) { return fileDescriptor5, []int{7} }
func (m *ReqQueryProposalRule) GetStatus() int32 { func (m *ReqQueryProposalRule) GetStatus() int32 {
if m != nil { if m != nil {
...@@ -510,35 +324,13 @@ func (m *ReqQueryProposalRule) GetIndex() int32 { ...@@ -510,35 +324,13 @@ func (m *ReqQueryProposalRule) GetIndex() int32 {
} }
type ReplyQueryProposalRule struct { type ReplyQueryProposalRule struct {
PropRules []*AutonomyProposalRule `protobuf:"bytes,1,rep,name=propRules,proto3" json:"propRules,omitempty"` PropRules []*AutonomyProposalRule `protobuf:"bytes,1,rep,name=propRules" json:"propRules,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ReplyQueryProposalRule) Reset() { *m = ReplyQueryProposalRule{} }
func (m *ReplyQueryProposalRule) String() string { return proto.CompactTextString(m) }
func (*ReplyQueryProposalRule) ProtoMessage() {}
func (*ReplyQueryProposalRule) Descriptor() ([]byte, []int) {
return fileDescriptor_rule_2ed9cd03418a949e, []int{8}
}
func (m *ReplyQueryProposalRule) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ReplyQueryProposalRule.Unmarshal(m, b)
}
func (m *ReplyQueryProposalRule) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ReplyQueryProposalRule.Marshal(b, m, deterministic)
}
func (dst *ReplyQueryProposalRule) XXX_Merge(src proto.Message) {
xxx_messageInfo_ReplyQueryProposalRule.Merge(dst, src)
}
func (m *ReplyQueryProposalRule) XXX_Size() int {
return xxx_messageInfo_ReplyQueryProposalRule.Size(m)
}
func (m *ReplyQueryProposalRule) XXX_DiscardUnknown() {
xxx_messageInfo_ReplyQueryProposalRule.DiscardUnknown(m)
} }
var xxx_messageInfo_ReplyQueryProposalRule proto.InternalMessageInfo func (m *ReplyQueryProposalRule) Reset() { *m = ReplyQueryProposalRule{} }
func (m *ReplyQueryProposalRule) String() string { return proto.CompactTextString(m) }
func (*ReplyQueryProposalRule) ProtoMessage() {}
func (*ReplyQueryProposalRule) Descriptor() ([]byte, []int) { return fileDescriptor5, []int{8} }
func (m *ReplyQueryProposalRule) GetPropRules() []*AutonomyProposalRule { func (m *ReplyQueryProposalRule) GetPropRules() []*AutonomyProposalRule {
if m != nil { if m != nil {
...@@ -549,36 +341,14 @@ func (m *ReplyQueryProposalRule) GetPropRules() []*AutonomyProposalRule { ...@@ -549,36 +341,14 @@ func (m *ReplyQueryProposalRule) GetPropRules() []*AutonomyProposalRule {
// TransferFund action // TransferFund action
type TransferFund struct { type TransferFund struct {
Amount int64 `protobuf:"varint,1,opt,name=amount,proto3" json:"amount,omitempty"` Amount int64 `protobuf:"varint,1,opt,name=amount" json:"amount,omitempty"`
Note string `protobuf:"bytes,2,opt,name=note,proto3" json:"note,omitempty"` Note string `protobuf:"bytes,2,opt,name=note" json:"note,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
} }
func (m *TransferFund) Reset() { *m = TransferFund{} } func (m *TransferFund) Reset() { *m = TransferFund{} }
func (m *TransferFund) String() string { return proto.CompactTextString(m) } func (m *TransferFund) String() string { return proto.CompactTextString(m) }
func (*TransferFund) ProtoMessage() {} func (*TransferFund) ProtoMessage() {}
func (*TransferFund) Descriptor() ([]byte, []int) { func (*TransferFund) Descriptor() ([]byte, []int) { return fileDescriptor5, []int{9} }
return fileDescriptor_rule_2ed9cd03418a949e, []int{9}
}
func (m *TransferFund) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_TransferFund.Unmarshal(m, b)
}
func (m *TransferFund) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_TransferFund.Marshal(b, m, deterministic)
}
func (dst *TransferFund) XXX_Merge(src proto.Message) {
xxx_messageInfo_TransferFund.Merge(dst, src)
}
func (m *TransferFund) XXX_Size() int {
return xxx_messageInfo_TransferFund.Size(m)
}
func (m *TransferFund) XXX_DiscardUnknown() {
xxx_messageInfo_TransferFund.DiscardUnknown(m)
}
var xxx_messageInfo_TransferFund proto.InternalMessageInfo
func (m *TransferFund) GetAmount() int64 { func (m *TransferFund) GetAmount() int64 {
if m != nil { if m != nil {
...@@ -596,37 +366,15 @@ func (m *TransferFund) GetNote() string { ...@@ -596,37 +366,15 @@ func (m *TransferFund) GetNote() string {
// Comment action // Comment action
type Comment struct { type Comment struct {
ProposalID string `protobuf:"bytes,1,opt,name=proposalID,proto3" json:"proposalID,omitempty"` ProposalID string `protobuf:"bytes,1,opt,name=proposalID" json:"proposalID,omitempty"`
RepHash string `protobuf:"bytes,2,opt,name=repHash,proto3" json:"repHash,omitempty"` RepHash string `protobuf:"bytes,2,opt,name=repHash" json:"repHash,omitempty"`
Comment string `protobuf:"bytes,3,opt,name=comment,proto3" json:"comment,omitempty"` Comment string `protobuf:"bytes,3,opt,name=comment" json:"comment,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
} }
func (m *Comment) Reset() { *m = Comment{} } func (m *Comment) Reset() { *m = Comment{} }
func (m *Comment) String() string { return proto.CompactTextString(m) } func (m *Comment) String() string { return proto.CompactTextString(m) }
func (*Comment) ProtoMessage() {} func (*Comment) ProtoMessage() {}
func (*Comment) Descriptor() ([]byte, []int) { func (*Comment) Descriptor() ([]byte, []int) { return fileDescriptor5, []int{10} }
return fileDescriptor_rule_2ed9cd03418a949e, []int{10}
}
func (m *Comment) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_Comment.Unmarshal(m, b)
}
func (m *Comment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_Comment.Marshal(b, m, deterministic)
}
func (dst *Comment) XXX_Merge(src proto.Message) {
xxx_messageInfo_Comment.Merge(dst, src)
}
func (m *Comment) XXX_Size() int {
return xxx_messageInfo_Comment.Size(m)
}
func (m *Comment) XXX_DiscardUnknown() {
xxx_messageInfo_Comment.DiscardUnknown(m)
}
var xxx_messageInfo_Comment proto.InternalMessageInfo
func (m *Comment) GetProposalID() string { func (m *Comment) GetProposalID() string {
if m != nil { if m != nil {
...@@ -650,38 +398,16 @@ func (m *Comment) GetComment() string { ...@@ -650,38 +398,16 @@ func (m *Comment) GetComment() string {
} }
type ReceiptProposalComment struct { type ReceiptProposalComment struct {
Cmt *Comment `protobuf:"bytes,1,opt,name=cmt,proto3" json:"cmt,omitempty"` Cmt *Comment `protobuf:"bytes,1,opt,name=cmt" json:"cmt,omitempty"`
Height int64 `protobuf:"varint,2,opt,name=height,proto3" json:"height,omitempty"` Height int64 `protobuf:"varint,2,opt,name=height" json:"height,omitempty"`
Index int32 `protobuf:"varint,3,opt,name=index,proto3" json:"index,omitempty"` Index int32 `protobuf:"varint,3,opt,name=index" json:"index,omitempty"`
Hash string `protobuf:"bytes,4,opt,name=hash,proto3" json:"hash,omitempty"` Hash string `protobuf:"bytes,4,opt,name=hash" json:"hash,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ReceiptProposalComment) Reset() { *m = ReceiptProposalComment{} }
func (m *ReceiptProposalComment) String() string { return proto.CompactTextString(m) }
func (*ReceiptProposalComment) ProtoMessage() {}
func (*ReceiptProposalComment) Descriptor() ([]byte, []int) {
return fileDescriptor_rule_2ed9cd03418a949e, []int{11}
}
func (m *ReceiptProposalComment) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ReceiptProposalComment.Unmarshal(m, b)
}
func (m *ReceiptProposalComment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ReceiptProposalComment.Marshal(b, m, deterministic)
}
func (dst *ReceiptProposalComment) XXX_Merge(src proto.Message) {
xxx_messageInfo_ReceiptProposalComment.Merge(dst, src)
}
func (m *ReceiptProposalComment) XXX_Size() int {
return xxx_messageInfo_ReceiptProposalComment.Size(m)
}
func (m *ReceiptProposalComment) XXX_DiscardUnknown() {
xxx_messageInfo_ReceiptProposalComment.DiscardUnknown(m)
} }
var xxx_messageInfo_ReceiptProposalComment proto.InternalMessageInfo func (m *ReceiptProposalComment) Reset() { *m = ReceiptProposalComment{} }
func (m *ReceiptProposalComment) String() string { return proto.CompactTextString(m) }
func (*ReceiptProposalComment) ProtoMessage() {}
func (*ReceiptProposalComment) Descriptor() ([]byte, []int) { return fileDescriptor5, []int{11} }
func (m *ReceiptProposalComment) GetCmt() *Comment { func (m *ReceiptProposalComment) GetCmt() *Comment {
if m != nil { if m != nil {
...@@ -713,39 +439,17 @@ func (m *ReceiptProposalComment) GetHash() string { ...@@ -713,39 +439,17 @@ func (m *ReceiptProposalComment) GetHash() string {
// query // query
type ReqQueryProposalComment struct { type ReqQueryProposalComment struct {
ProposalID string `protobuf:"bytes,1,opt,name=proposalID,proto3" json:"proposalID,omitempty"` ProposalID string `protobuf:"bytes,1,opt,name=proposalID" json:"proposalID,omitempty"`
Count int32 `protobuf:"varint,2,opt,name=count,proto3" json:"count,omitempty"` Count int32 `protobuf:"varint,2,opt,name=count" json:"count,omitempty"`
Direction int32 `protobuf:"varint,3,opt,name=direction,proto3" json:"direction,omitempty"` Direction int32 `protobuf:"varint,3,opt,name=direction" json:"direction,omitempty"`
Height int64 `protobuf:"varint,4,opt,name=height,proto3" json:"height,omitempty"` Height int64 `protobuf:"varint,4,opt,name=height" json:"height,omitempty"`
Index int32 `protobuf:"varint,5,opt,name=index,proto3" json:"index,omitempty"` Index int32 `protobuf:"varint,5,opt,name=index" json:"index,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ReqQueryProposalComment) Reset() { *m = ReqQueryProposalComment{} }
func (m *ReqQueryProposalComment) String() string { return proto.CompactTextString(m) }
func (*ReqQueryProposalComment) ProtoMessage() {}
func (*ReqQueryProposalComment) Descriptor() ([]byte, []int) {
return fileDescriptor_rule_2ed9cd03418a949e, []int{12}
}
func (m *ReqQueryProposalComment) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ReqQueryProposalComment.Unmarshal(m, b)
}
func (m *ReqQueryProposalComment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ReqQueryProposalComment.Marshal(b, m, deterministic)
}
func (dst *ReqQueryProposalComment) XXX_Merge(src proto.Message) {
xxx_messageInfo_ReqQueryProposalComment.Merge(dst, src)
}
func (m *ReqQueryProposalComment) XXX_Size() int {
return xxx_messageInfo_ReqQueryProposalComment.Size(m)
}
func (m *ReqQueryProposalComment) XXX_DiscardUnknown() {
xxx_messageInfo_ReqQueryProposalComment.DiscardUnknown(m)
} }
var xxx_messageInfo_ReqQueryProposalComment proto.InternalMessageInfo func (m *ReqQueryProposalComment) Reset() { *m = ReqQueryProposalComment{} }
func (m *ReqQueryProposalComment) String() string { return proto.CompactTextString(m) }
func (*ReqQueryProposalComment) ProtoMessage() {}
func (*ReqQueryProposalComment) Descriptor() ([]byte, []int) { return fileDescriptor5, []int{12} }
func (m *ReqQueryProposalComment) GetProposalID() string { func (m *ReqQueryProposalComment) GetProposalID() string {
if m != nil { if m != nil {
...@@ -783,39 +487,17 @@ func (m *ReqQueryProposalComment) GetIndex() int32 { ...@@ -783,39 +487,17 @@ func (m *ReqQueryProposalComment) GetIndex() int32 {
} }
type RelationCmt struct { type RelationCmt struct {
RepHash string `protobuf:"bytes,1,opt,name=repHash,proto3" json:"repHash,omitempty"` RepHash string `protobuf:"bytes,1,opt,name=repHash" json:"repHash,omitempty"`
Comment string `protobuf:"bytes,2,opt,name=comment,proto3" json:"comment,omitempty"` Comment string `protobuf:"bytes,2,opt,name=comment" json:"comment,omitempty"`
Height int64 `protobuf:"varint,3,opt,name=height,proto3" json:"height,omitempty"` Height int64 `protobuf:"varint,3,opt,name=height" json:"height,omitempty"`
Index int32 `protobuf:"varint,4,opt,name=index,proto3" json:"index,omitempty"` Index int32 `protobuf:"varint,4,opt,name=index" json:"index,omitempty"`
Hash string `protobuf:"bytes,5,opt,name=hash,proto3" json:"hash,omitempty"` Hash string `protobuf:"bytes,5,opt,name=hash" json:"hash,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
} }
func (m *RelationCmt) Reset() { *m = RelationCmt{} } func (m *RelationCmt) Reset() { *m = RelationCmt{} }
func (m *RelationCmt) String() string { return proto.CompactTextString(m) } func (m *RelationCmt) String() string { return proto.CompactTextString(m) }
func (*RelationCmt) ProtoMessage() {} func (*RelationCmt) ProtoMessage() {}
func (*RelationCmt) Descriptor() ([]byte, []int) { func (*RelationCmt) Descriptor() ([]byte, []int) { return fileDescriptor5, []int{13} }
return fileDescriptor_rule_2ed9cd03418a949e, []int{13}
}
func (m *RelationCmt) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_RelationCmt.Unmarshal(m, b)
}
func (m *RelationCmt) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_RelationCmt.Marshal(b, m, deterministic)
}
func (dst *RelationCmt) XXX_Merge(src proto.Message) {
xxx_messageInfo_RelationCmt.Merge(dst, src)
}
func (m *RelationCmt) XXX_Size() int {
return xxx_messageInfo_RelationCmt.Size(m)
}
func (m *RelationCmt) XXX_DiscardUnknown() {
xxx_messageInfo_RelationCmt.DiscardUnknown(m)
}
var xxx_messageInfo_RelationCmt proto.InternalMessageInfo
func (m *RelationCmt) GetRepHash() string { func (m *RelationCmt) GetRepHash() string {
if m != nil { if m != nil {
...@@ -853,35 +535,13 @@ func (m *RelationCmt) GetHash() string { ...@@ -853,35 +535,13 @@ func (m *RelationCmt) GetHash() string {
} }
type ReplyQueryProposalComment struct { type ReplyQueryProposalComment struct {
RltCmt []*RelationCmt `protobuf:"bytes,1,rep,name=rltCmt,proto3" json:"rltCmt,omitempty"` RltCmt []*RelationCmt `protobuf:"bytes,1,rep,name=rltCmt" json:"rltCmt,omitempty"`
XXX_NoUnkeyedLiteral struct{} `json:"-"`
XXX_unrecognized []byte `json:"-"`
XXX_sizecache int32 `json:"-"`
}
func (m *ReplyQueryProposalComment) Reset() { *m = ReplyQueryProposalComment{} }
func (m *ReplyQueryProposalComment) String() string { return proto.CompactTextString(m) }
func (*ReplyQueryProposalComment) ProtoMessage() {}
func (*ReplyQueryProposalComment) Descriptor() ([]byte, []int) {
return fileDescriptor_rule_2ed9cd03418a949e, []int{14}
}
func (m *ReplyQueryProposalComment) XXX_Unmarshal(b []byte) error {
return xxx_messageInfo_ReplyQueryProposalComment.Unmarshal(m, b)
}
func (m *ReplyQueryProposalComment) XXX_Marshal(b []byte, deterministic bool) ([]byte, error) {
return xxx_messageInfo_ReplyQueryProposalComment.Marshal(b, m, deterministic)
}
func (dst *ReplyQueryProposalComment) XXX_Merge(src proto.Message) {
xxx_messageInfo_ReplyQueryProposalComment.Merge(dst, src)
}
func (m *ReplyQueryProposalComment) XXX_Size() int {
return xxx_messageInfo_ReplyQueryProposalComment.Size(m)
}
func (m *ReplyQueryProposalComment) XXX_DiscardUnknown() {
xxx_messageInfo_ReplyQueryProposalComment.DiscardUnknown(m)
} }
var xxx_messageInfo_ReplyQueryProposalComment proto.InternalMessageInfo func (m *ReplyQueryProposalComment) Reset() { *m = ReplyQueryProposalComment{} }
func (m *ReplyQueryProposalComment) String() string { return proto.CompactTextString(m) }
func (*ReplyQueryProposalComment) ProtoMessage() {}
func (*ReplyQueryProposalComment) Descriptor() ([]byte, []int) { return fileDescriptor5, []int{14} }
func (m *ReplyQueryProposalComment) GetRltCmt() []*RelationCmt { func (m *ReplyQueryProposalComment) GetRltCmt() []*RelationCmt {
if m != nil { if m != nil {
...@@ -908,9 +568,9 @@ func init() { ...@@ -908,9 +568,9 @@ func init() {
proto.RegisterType((*ReplyQueryProposalComment)(nil), "types.ReplyQueryProposalComment") proto.RegisterType((*ReplyQueryProposalComment)(nil), "types.ReplyQueryProposalComment")
} }
func init() { proto.RegisterFile("rule.proto", fileDescriptor_rule_2ed9cd03418a949e) } func init() { proto.RegisterFile("rule.proto", fileDescriptor5) }
var fileDescriptor_rule_2ed9cd03418a949e = []byte{ var fileDescriptor5 = []byte{
// 733 bytes of a gzipped FileDescriptorProto // 733 bytes of a gzipped FileDescriptorProto
0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x55, 0x4d, 0x6f, 0xd4, 0x3a, 0x1f, 0x8b, 0x08, 0x00, 0x00, 0x00, 0x00, 0x00, 0x02, 0xff, 0x94, 0x55, 0x4d, 0x6f, 0xd4, 0x3a,
0x14, 0x55, 0x26, 0xc9, 0x7c, 0xdc, 0xf6, 0x55, 0xad, 0xdb, 0xd7, 0x97, 0xd7, 0xf7, 0x84, 0x46, 0x14, 0x55, 0x26, 0xc9, 0x7c, 0xdc, 0xf6, 0x55, 0xad, 0xdb, 0xd7, 0x97, 0xd7, 0xf7, 0x84, 0x46,
......
...@@ -340,11 +340,22 @@ func (action *Action) TicketMiner(miner *ty.TicketMiner, index int) (*types.Rece ...@@ -340,11 +340,22 @@ func (action *Action) TicketMiner(miner *ty.TicketMiner, index int) (*types.Rece
return nil, err return nil, err
} }
//fund //fund
receipt2, err := action.coinsAccount.ExecDepositFrozen(types.GetFundAddr(), action.execaddr, cfg.CoinDevFund) var receipt2 *types.Receipt
if err != nil { if types.IsFork(action.height, "ForkTicketFundAddrV2") {
tlog.Error("TicketMiner.ExecDepositFrozen fund", "addr", types.GetFundAddr(), "execaddr", action.execaddr) // issue coins to exec addr
return nil, err receipt2, err = action.coinsAccount.ExecIssueCoins(types.GetFundAddr(), cfg.CoinDevFund)
if err != nil {
tlog.Error("TicketMiner.ExecDepositFrozen fund to autonomy fund", "addr", types.GetFundAddr())
return nil, err
}
} else {
receipt2, err = action.coinsAccount.ExecDepositFrozen(types.GetFundAddr(), action.execaddr, cfg.CoinDevFund)
if err != nil {
tlog.Error("TicketMiner.ExecDepositFrozen fund", "addr", types.GetFundAddr(), "execaddr", action.execaddr)
return nil, err
}
} }
t.Save(action.db) t.Save(action.db)
logs = append(logs, t.GetReceiptLog()) logs = append(logs, t.GetReceiptLog())
kv = append(kv, t.GetKVSet()...) kv = append(kv, t.GetKVSet()...)
......
...@@ -61,6 +61,7 @@ func init() { ...@@ -61,6 +61,7 @@ func init() {
types.RegisterDappFork(TicketX, "Enable", 0) types.RegisterDappFork(TicketX, "Enable", 0)
types.RegisterDappFork(TicketX, "ForkTicketId", 1062000) types.RegisterDappFork(TicketX, "ForkTicketId", 1062000)
types.RegisterDappFork(TicketX, "ForkTicketVrf", 1770000) types.RegisterDappFork(TicketX, "ForkTicketVrf", 1770000)
types.RegisterDappFork(TicketX, "ForkTicketFundAddrV2", 500 * 10000)
} }
// TicketType ticket exec type // TicketType ticket exec type
......
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