refactor: use mocks for x/distribution (#12889)

* initial commit

* add mocks

* TestAllocateTokensToManyValidators

* one file more in, like a hundred left

* progress

* progress

* move tests to integration

* finally got TestCalculateRewardsMultiDelegator right lol

* small fixes

* progress

* progress

* progress

* progress

* revert test panic

* progress

* progress

* more progress

* fix go.mod

* merge

* merge

* cache issue?

* fix go.sum

* fix tests

* make mocks

* move back simulations

Co-authored-by: Marko <marbar3778@yahoo.com>
This commit is contained in:
Facundo Medica
2022-08-29 20:15:51 -03:00
committed by GitHub
co-authored by Marko
parent 8436dc1741
commit 0024a0bf44
19 changed files with 2735 additions and 601 deletions
+1 -1
View File
@@ -381,7 +381,7 @@ func setupValidatorRewards(app *simapp.SimApp, ctx sdk.Context, valAddress sdk.V
decCoins := sdk.DecCoins{sdk.NewDecCoinFromDec(sdk.DefaultBondDenom, math.LegacyOneDec())}
historicalRewards := distrtypes.NewValidatorHistoricalRewards(decCoins, 2)
app.DistrKeeper.SetValidatorHistoricalRewards(ctx, valAddress, 2, historicalRewards)
// setup current revards
// setup current rewards
currentRewards := distrtypes.NewValidatorCurrentRewards(decCoins, 3)
app.DistrKeeper.SetValidatorCurrentRewards(ctx, valAddress, currentRewards)
}