Merge PR #4779: Update staking/supply to use exported account interface
This commit is contained in:
parent
2b3d78599e
commit
243e87660b
|
@ -2,7 +2,7 @@ package types
|
|||
|
||||
import (
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
"github.com/cosmos/cosmos-sdk/x/auth"
|
||||
"github.com/cosmos/cosmos-sdk/x/auth/exported"
|
||||
stakingexported "github.com/cosmos/cosmos-sdk/x/staking/exported"
|
||||
"github.com/cosmos/cosmos-sdk/x/supply"
|
||||
supplyexported "github.com/cosmos/cosmos-sdk/x/supply/exported"
|
||||
|
@ -16,7 +16,7 @@ type DistributionKeeper interface {
|
|||
|
||||
// AccountKeeper defines the expected account keeper (noalias)
|
||||
type AccountKeeper interface {
|
||||
IterateAccounts(ctx sdk.Context, process func(auth.Account) (stop bool))
|
||||
IterateAccounts(ctx sdk.Context, process func(exported.Account) (stop bool))
|
||||
}
|
||||
|
||||
// SupplyKeeper defines the expected supply Keeper (noalias)
|
||||
|
|
|
@ -2,7 +2,7 @@ package supply
|
|||
|
||||
import (
|
||||
sdk "github.com/cosmos/cosmos-sdk/types"
|
||||
autypes "github.com/cosmos/cosmos-sdk/x/auth"
|
||||
authtypes "github.com/cosmos/cosmos-sdk/x/auth/exported"
|
||||
"github.com/cosmos/cosmos-sdk/x/supply/internal/types"
|
||||
)
|
||||
|
||||
|
@ -14,7 +14,7 @@ func InitGenesis(ctx sdk.Context, keeper Keeper, ak types.AccountKeeper, data Ge
|
|||
if data.Supply.Total.Empty() {
|
||||
var totalSupply sdk.Coins
|
||||
ak.IterateAccounts(ctx,
|
||||
func(acc autypes.Account) (stop bool) {
|
||||
func(acc authtypes.Account) (stop bool) {
|
||||
totalSupply = totalSupply.Add(acc.GetCoins())
|
||||
return false
|
||||
},
|
||||
|
|
Loading…
Reference in New Issue