Community pool spend proposal (#4329)

Implement the "CommunityPoolSpendProposal" as described in Cosmos Hub proposal 7.

Also a useful test of Git flow for merging features passed in governance proposals.
This commit is contained in:
Christopher Goes
2019-05-21 11:02:10 +01:00
committed by Alessio Treglia
parent 4b872d2eb4
commit dd89c32951
19 changed files with 383 additions and 17 deletions
+2 -1
View File
@@ -5,6 +5,7 @@ import (
"math/rand"
"time"
"github.com/cosmos/cosmos-sdk/baseapp"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/x/gov"
"github.com/cosmos/cosmos-sdk/x/params"
@@ -109,7 +110,7 @@ var paramChangePool = []simParamChange{
// SimulateParamChangeProposalContent returns random parameter change content.
// It will generate a ParameterChangeProposal object with anywhere between 1 and
// 3 parameter changes all of which have random, but valid values.
func SimulateParamChangeProposalContent(r *rand.Rand) gov.Content {
func SimulateParamChangeProposalContent(r *rand.Rand, _ *baseapp.BaseApp, _ sdk.Context, _ []simulation.Account) gov.Content {
numChanges := simulation.RandIntBetween(r, 1, len(paramChangePool)/2)
paramChanges := make([]params.ParamChange, numChanges, numChanges)
paramChangesKeys := make(map[string]struct{})