Skip to content

Commit

Permalink
Merge pull request #48 from MrXJC/irisnet/jiacheng_gov
Browse files Browse the repository at this point in the history
add NewIrisGenesisState for irishub
  • Loading branch information
wukongcheng authored Aug 14, 2018
2 parents 81c75bd + aa18f1a commit de32d86
Showing 1 changed file with 20 additions and 0 deletions.
20 changes: 20 additions & 0 deletions x/gov/genesis.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,26 @@ func NewGenesisState(startingProposalID int64, dp DepositProcedure, vp VotingPro
}
}

//////////////////// iris/cosmos-sdk begin///////////////////////////
func NewIrisGenesisState(minDeposit sdk.Coins, depositPeriod int64, votingPeriod int64) GenesisState {
return GenesisState{
StartingProposalID: 1,
DepositProcedure: DepositProcedure{
MinDeposit: minDeposit,
MaxDepositPeriod: depositPeriod,
},
VotingProcedure: VotingProcedure{
VotingPeriod: votingPeriod,
},
TallyingProcedure: TallyingProcedure{
Threshold: sdk.NewRat(1, 2),
Veto: sdk.NewRat(1, 3),
GovernancePenalty: sdk.NewRat(1, 100),
},
}
}
//////////////////// iris/cosmos-sdk end///////////////////////////

// get raw genesis raw message for testing
func DefaultGenesisState() GenesisState {
return GenesisState{
Expand Down

0 comments on commit de32d86

Please sign in to comment.