-
Notifications
You must be signed in to change notification settings - Fork 3.7k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
x/distribution: simapp for testing (#5725)
* migrate first distribution test to use simapp * refactor test TestAllocateTokensTruncation * migrate allocation test for distribution * migrate TestCalculateRewardsBasic to simapp in distribution * migrate TestCalculateRewardsAfterSlash to simapp in distribution * migrate TestCalculateRewardsAfterManySlashes to use simapp * migrate TestCalculateRewardsMultiDelegator to use ssimapp * migrate TestWithdrawDelegationRewardsBasic to simapp * migrate TestCalculateRewardsAfterManySlashesInSameBlock to simapp * migrate TestCalculateRewardsMultiDelegatorMultiSlash * migrate old delegation test * migrate keeper test to simapp * refactor all distribution to use simapp Co-authored-by: Federico Kunze <[email protected]>
- Loading branch information
1 parent
da5c6ce
commit 9acd722
Showing
12 changed files
with
384 additions
and
458 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,21 @@ | ||
package keeper_test | ||
|
||
import ( | ||
"github.com/cosmos/cosmos-sdk/simapp" | ||
sdk "github.com/cosmos/cosmos-sdk/types" | ||
"github.com/cosmos/cosmos-sdk/x/distribution/types" | ||
"github.com/cosmos/cosmos-sdk/x/supply" | ||
) | ||
|
||
var ( | ||
PKS = simapp.CreateTestPubKeys(5) | ||
|
||
valConsPk1 = PKS[0] | ||
valConsPk2 = PKS[1] | ||
valConsPk3 = PKS[2] | ||
|
||
valConsAddr1 = sdk.ConsAddress(valConsPk1.Address()) | ||
valConsAddr2 = sdk.ConsAddress(valConsPk2.Address()) | ||
|
||
distrAcc = supply.NewEmptyModuleAccount(types.ModuleName) | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.