Cleanup, additional item in PENDING.md
This commit is contained in:
parent
604de8599a
commit
edd56be952
|
@ -55,6 +55,7 @@ BREAKING CHANGES
|
||||||
* [x/slashing] Truncate withdrawals (unbonding, redelegation) and burn change
|
* [x/slashing] Truncate withdrawals (unbonding, redelegation) and burn change
|
||||||
* [x/mock/simulation] Ensure the simulation cannot set a proposer address of nil
|
* [x/mock/simulation] Ensure the simulation cannot set a proposer address of nil
|
||||||
* [x/mock/simulation] Add more event logs on begin block / end block for clarity
|
* [x/mock/simulation] Add more event logs on begin block / end block for clarity
|
||||||
|
* [x/mock/simulation] Correctly set validator power in abci.RequestBeginBlock
|
||||||
* [x/minting] Correctly call stake keeper to track inflated supply
|
* [x/minting] Correctly call stake keeper to track inflated supply
|
||||||
* [x/distribution] Sanity check for nonexistent rewards
|
* [x/distribution] Sanity check for nonexistent rewards
|
||||||
* [x/distribution] Truncate withdrawals and return change to the community pool
|
* [x/distribution] Truncate withdrawals and return change to the community pool
|
||||||
|
|
|
@ -126,7 +126,6 @@ func testAndRunTxs(app *GaiaApp) []simulation.WeightedOperation {
|
||||||
func invariants(app *GaiaApp) []simulation.Invariant {
|
func invariants(app *GaiaApp) []simulation.Invariant {
|
||||||
return []simulation.Invariant{
|
return []simulation.Invariant{
|
||||||
banksim.NonnegativeBalanceInvariant(app.accountKeeper),
|
banksim.NonnegativeBalanceInvariant(app.accountKeeper),
|
||||||
distributionsim.AllInvariants(app.bankKeeper, app.distrKeeper, app.accountKeeper),
|
|
||||||
govsim.AllInvariants(),
|
govsim.AllInvariants(),
|
||||||
stakesim.AllInvariants(app.bankKeeper, app.stakeKeeper, app.feeCollectionKeeper, app.distrKeeper, app.accountKeeper),
|
stakesim.AllInvariants(app.bankKeeper, app.stakeKeeper, app.feeCollectionKeeper, app.distrKeeper, app.accountKeeper),
|
||||||
slashingsim.AllInvariants(),
|
slashingsim.AllInvariants(),
|
||||||
|
|
|
@ -23,6 +23,7 @@ func (k Keeper) onValidatorCreated(ctx sdk.Context, addr sdk.ValAddress) {
|
||||||
|
|
||||||
// Withdrawal all validator rewards
|
// Withdrawal all validator rewards
|
||||||
func (k Keeper) onValidatorModified(ctx sdk.Context, addr sdk.ValAddress) {
|
func (k Keeper) onValidatorModified(ctx sdk.Context, addr sdk.ValAddress) {
|
||||||
|
// This doesn't need to be run at genesis
|
||||||
if ctx.BlockHeight() > 0 {
|
if ctx.BlockHeight() > 0 {
|
||||||
if err := k.WithdrawValidatorRewardsAll(ctx, addr); err != nil {
|
if err := k.WithdrawValidatorRewardsAll(ctx, addr); err != nil {
|
||||||
panic(err)
|
panic(err)
|
||||||
|
|
|
@ -1,17 +0,0 @@
|
||||||
package simulation
|
|
||||||
|
|
||||||
import (
|
|
||||||
"github.com/cosmos/cosmos-sdk/baseapp"
|
|
||||||
"github.com/cosmos/cosmos-sdk/x/auth"
|
|
||||||
"github.com/cosmos/cosmos-sdk/x/bank"
|
|
||||||
"github.com/cosmos/cosmos-sdk/x/distribution"
|
|
||||||
"github.com/cosmos/cosmos-sdk/x/mock/simulation"
|
|
||||||
)
|
|
||||||
|
|
||||||
// AllInvariants runs all invariants of the distribution module.
|
|
||||||
// Currently: total supply, positive power
|
|
||||||
func AllInvariants(ck bank.Keeper, k distribution.Keeper, am auth.AccountKeeper) simulation.Invariant {
|
|
||||||
return func(app *baseapp.BaseApp) error {
|
|
||||||
return nil
|
|
||||||
}
|
|
||||||
}
|
|
|
@ -8,7 +8,6 @@ import (
|
||||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||||
"github.com/cosmos/cosmos-sdk/x/auth"
|
"github.com/cosmos/cosmos-sdk/x/auth"
|
||||||
"github.com/cosmos/cosmos-sdk/x/distribution"
|
"github.com/cosmos/cosmos-sdk/x/distribution"
|
||||||
"github.com/cosmos/cosmos-sdk/x/mock"
|
|
||||||
"github.com/cosmos/cosmos-sdk/x/mock/simulation"
|
"github.com/cosmos/cosmos-sdk/x/mock/simulation"
|
||||||
)
|
)
|
||||||
|
|
||||||
|
@ -121,10 +120,3 @@ func SimulateMsgWithdrawValidatorRewardsAll(m auth.AccountKeeper, k distribution
|
||||||
return action, nil, nil
|
return action, nil, nil
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Setup
|
|
||||||
// nolint: errcheck
|
|
||||||
func Setup(mapp *mock.App, k distribution.Keeper) simulation.RandSetup {
|
|
||||||
return func(r *rand.Rand, accs []simulation.Account) {
|
|
||||||
}
|
|
||||||
}
|
|
||||||
|
|
Loading…
Reference in New Issue