Merge PR #175: Bump SDK to latest master

This commit is contained in:
Alexander Bezobchuk
2019-11-04 10:42:10 -07:00
committed by GitHub
parent b873cb16ec
commit d518038d0b
5 changed files with 74 additions and 76 deletions

View File

@@ -9,7 +9,6 @@ import (
"testing"
"github.com/stretchr/testify/require"
abci "github.com/tendermint/tendermint/abci/types"
"github.com/tendermint/tendermint/libs/log"
dbm "github.com/tendermint/tm-db"
@@ -19,20 +18,19 @@ import (
"github.com/cosmos/cosmos-sdk/store"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/cosmos/cosmos-sdk/x/auth"
authsimops "github.com/cosmos/cosmos-sdk/x/auth/simulation/operations"
banksimops "github.com/cosmos/cosmos-sdk/x/bank/simulation/operations"
banksim "github.com/cosmos/cosmos-sdk/x/bank/simulation"
distr "github.com/cosmos/cosmos-sdk/x/distribution"
distrsimops "github.com/cosmos/cosmos-sdk/x/distribution/simulation/operations"
distrsim "github.com/cosmos/cosmos-sdk/x/distribution/simulation"
"github.com/cosmos/cosmos-sdk/x/gov"
govsimops "github.com/cosmos/cosmos-sdk/x/gov/simulation/operations"
govsim "github.com/cosmos/cosmos-sdk/x/gov/simulation"
"github.com/cosmos/cosmos-sdk/x/mint"
"github.com/cosmos/cosmos-sdk/x/params"
paramsimops "github.com/cosmos/cosmos-sdk/x/params/simulation/operations"
paramsim "github.com/cosmos/cosmos-sdk/x/params/simulation"
"github.com/cosmos/cosmos-sdk/x/simulation"
"github.com/cosmos/cosmos-sdk/x/slashing"
slashingsimops "github.com/cosmos/cosmos-sdk/x/slashing/simulation/operations"
slashingsim "github.com/cosmos/cosmos-sdk/x/slashing/simulation"
"github.com/cosmos/cosmos-sdk/x/staking"
stakingsimops "github.com/cosmos/cosmos-sdk/x/staking/simulation/operations"
stakingsim "github.com/cosmos/cosmos-sdk/x/staking/simulation"
"github.com/cosmos/cosmos-sdk/x/supply"
)
@@ -56,17 +54,6 @@ func testAndRunTxs(app *GaiaApp, config simulation.Config) []simulation.Weighted
// nolint: govet
return []simulation.WeightedOperation{
{
func(_ *rand.Rand) int {
var v int
ap.GetOrGenerate(app.cdc, OpWeightDeductFee, &v, nil,
func(_ *rand.Rand) {
v = 5
})
return v
}(nil),
authsimops.SimulateDeductFee(app.accountKeeper, app.supplyKeeper),
},
{
func(_ *rand.Rand) int {
var v int
@@ -76,18 +63,18 @@ func testAndRunTxs(app *GaiaApp, config simulation.Config) []simulation.Weighted
})
return v
}(nil),
banksimops.SimulateMsgSend(app.accountKeeper, app.bankKeeper),
banksim.SimulateMsgSend(app.accountKeeper, app.bankKeeper),
},
{
func(_ *rand.Rand) int {
var v int
ap.GetOrGenerate(app.cdc, OpWeightSingleInputMsgMultiSend, &v, nil,
ap.GetOrGenerate(app.cdc, OpWeightMsgMultiSend, &v, nil,
func(_ *rand.Rand) {
v = 10
v = 40
})
return v
}(nil),
banksimops.SimulateSingleInputMsgMultiSend(app.accountKeeper, app.bankKeeper),
banksim.SimulateMsgMultiSend(app.accountKeeper, app.bankKeeper),
},
{
func(_ *rand.Rand) int {
@@ -98,7 +85,7 @@ func testAndRunTxs(app *GaiaApp, config simulation.Config) []simulation.Weighted
})
return v
}(nil),
distrsimops.SimulateMsgSetWithdrawAddress(app.distrKeeper),
distrsim.SimulateMsgSetWithdrawAddress(app.accountKeeper, app.distrKeeper),
},
{
func(_ *rand.Rand) int {
@@ -109,7 +96,7 @@ func testAndRunTxs(app *GaiaApp, config simulation.Config) []simulation.Weighted
})
return v
}(nil),
distrsimops.SimulateMsgWithdrawDelegatorReward(app.distrKeeper),
distrsim.SimulateMsgWithdrawDelegatorReward(app.accountKeeper, app.distrKeeper, app.stakingKeeper),
},
{
func(_ *rand.Rand) int {
@@ -120,40 +107,40 @@ func testAndRunTxs(app *GaiaApp, config simulation.Config) []simulation.Weighted
})
return v
}(nil),
distrsimops.SimulateMsgWithdrawValidatorCommission(app.distrKeeper),
distrsim.SimulateMsgWithdrawValidatorCommission(app.accountKeeper, app.distrKeeper, app.stakingKeeper),
},
{
func(_ *rand.Rand) int {
var v int
ap.GetOrGenerate(app.cdc, OpWeightSubmitVotingSlashingTextProposal, &v, nil,
ap.GetOrGenerate(app.cdc, OpWeightSubmitTextProposal, &v, nil,
func(_ *rand.Rand) {
v = 5
v = 20
})
return v
}(nil),
govsimops.SimulateSubmittingVotingAndSlashingForProposal(app.govKeeper, govsimops.SimulateTextProposalContent),
govsim.SimulateSubmitProposal(app.accountKeeper, app.govKeeper, govsim.SimulateTextProposalContent),
},
{
func(_ *rand.Rand) int {
var v int
ap.GetOrGenerate(app.cdc, OpWeightSubmitVotingSlashingCommunitySpendProposal, &v, nil,
ap.GetOrGenerate(app.cdc, OpWeightSubmitCommunitySpendProposal, &v, nil,
func(_ *rand.Rand) {
v = 5
v = 20
})
return v
}(nil),
govsimops.SimulateSubmittingVotingAndSlashingForProposal(app.govKeeper, distrsimops.SimulateCommunityPoolSpendProposalContent(app.distrKeeper)),
govsim.SimulateSubmitProposal(app.accountKeeper, app.govKeeper, distrsim.SimulateCommunityPoolSpendProposalContent(app.distrKeeper)),
},
{
func(_ *rand.Rand) int {
var v int
ap.GetOrGenerate(app.cdc, OpWeightSubmitVotingSlashingParamChangeProposal, &v, nil,
ap.GetOrGenerate(app.cdc, OpWeightSubmitParamChangeProposal, &v, nil,
func(_ *rand.Rand) {
v = 5
v = 20
})
return v
}(nil),
govsimops.SimulateSubmittingVotingAndSlashingForProposal(app.govKeeper, paramsimops.SimulateParamChangeProposalContent(paramChanges)),
govsim.SimulateSubmitProposal(app.accountKeeper, app.govKeeper, paramsim.SimulateParamChangeProposalContent(paramChanges)),
},
{
func(_ *rand.Rand) int {
@@ -164,7 +151,18 @@ func testAndRunTxs(app *GaiaApp, config simulation.Config) []simulation.Weighted
})
return v
}(nil),
govsimops.SimulateMsgDeposit(app.govKeeper),
govsim.SimulateMsgDeposit(app.accountKeeper, app.govKeeper),
},
{
func(_ *rand.Rand) int {
var v int
ap.GetOrGenerate(app.cdc, OpWeightMsgVote, &v, nil,
func(_ *rand.Rand) {
v = 100
})
return v
}(nil),
govsim.SimulateMsgVote(app.accountKeeper, app.govKeeper),
},
{
func(_ *rand.Rand) int {
@@ -175,18 +173,18 @@ func testAndRunTxs(app *GaiaApp, config simulation.Config) []simulation.Weighted
})
return v
}(nil),
stakingsimops.SimulateMsgCreateValidator(app.accountKeeper, app.stakingKeeper),
stakingsim.SimulateMsgCreateValidator(app.accountKeeper, app.stakingKeeper),
},
{
func(_ *rand.Rand) int {
var v int
ap.GetOrGenerate(app.cdc, OpWeightMsgEditValidator, &v, nil,
func(_ *rand.Rand) {
v = 5
v = 20
})
return v
}(nil),
stakingsimops.SimulateMsgEditValidator(app.stakingKeeper),
stakingsim.SimulateMsgEditValidator(app.accountKeeper, app.stakingKeeper),
},
{
func(_ *rand.Rand) int {
@@ -197,7 +195,7 @@ func testAndRunTxs(app *GaiaApp, config simulation.Config) []simulation.Weighted
})
return v
}(nil),
stakingsimops.SimulateMsgDelegate(app.accountKeeper, app.stakingKeeper),
stakingsim.SimulateMsgDelegate(app.accountKeeper, app.stakingKeeper),
},
{
func(_ *rand.Rand) int {
@@ -208,7 +206,7 @@ func testAndRunTxs(app *GaiaApp, config simulation.Config) []simulation.Weighted
})
return v
}(nil),
stakingsimops.SimulateMsgUndelegate(app.accountKeeper, app.stakingKeeper),
stakingsim.SimulateMsgUndelegate(app.accountKeeper, app.stakingKeeper),
},
{
func(_ *rand.Rand) int {
@@ -219,7 +217,7 @@ func testAndRunTxs(app *GaiaApp, config simulation.Config) []simulation.Weighted
})
return v
}(nil),
stakingsimops.SimulateMsgBeginRedelegate(app.accountKeeper, app.stakingKeeper),
stakingsim.SimulateMsgBeginRedelegate(app.accountKeeper, app.stakingKeeper),
},
{
func(_ *rand.Rand) int {
@@ -230,7 +228,7 @@ func testAndRunTxs(app *GaiaApp, config simulation.Config) []simulation.Weighted
})
return v
}(nil),
slashingsimops.SimulateMsgUnjail(app.slashingKeeper),
slashingsim.SimulateMsgUnjail(app.accountKeeper, app.slashingKeeper, app.stakingKeeper),
},
}
}