fix tests

This commit is contained in:
Ethan Buchman 2018-07-16 18:08:22 +01:00
parent 8f453eaa04
commit 2cbe5662d0
2 changed files with 16 additions and 3 deletions

View File

@ -128,18 +128,24 @@ func (keeper Keeper) activateVotingPeriod(ctx sdk.Context, proposal Proposal) {
// =====================================================
// Procedures
var (
defaultMinDeposit int64 = 100
defaultMaxDepositPeriod int64 = 10000
defaultVotingPeriod int64 = 10000
)
// Gets procedure from store. TODO: move to global param store and allow for updating of this
func (keeper Keeper) GetDepositProcedure() DepositProcedure {
return DepositProcedure{
MinDeposit: sdk.Coins{sdk.NewCoin("steak", 100)},
MaxDepositPeriod: 10000,
MinDeposit: sdk.Coins{sdk.NewCoin("steak", defaultMinDeposit)},
MaxDepositPeriod: defaultMaxDepositPeriod,
}
}
// Gets procedure from store. TODO: move to global param store and allow for updating of this
func (keeper Keeper) GetVotingProcedure() VotingProcedure {
return VotingProcedure{
VotingPeriod: 10000,
VotingPeriod: defaultVotingPeriod,
}
}

View File

@ -10,6 +10,13 @@ import (
sdk "github.com/cosmos/cosmos-sdk/types"
)
// overwrite defaults for testing
func init() {
defaultMinDeposit = 10
defaultMaxDepositPeriod = 200
defaultVotingPeriod = 200
}
func TestGetSetProposal(t *testing.T) {
mapp, keeper, _, _, _, _ := getMockApp(t, 0)
mapp.BeginBlock(abci.RequestBeginBlock{})