diff --git a/x/bank/alias.go b/x/bank/alias.go index 72b998ca0983..1233c4521fdc 100644 --- a/x/bank/alias.go +++ b/x/bank/alias.go @@ -7,7 +7,7 @@ package bank import ( "github.com/cosmos/cosmos-sdk/x/bank/internal/handler" "github.com/cosmos/cosmos-sdk/x/bank/internal/keeper" - "github.com/cosmos/cosmos-sdk/x/bank/internal/simulation" + "github.com/cosmos/cosmos-sdk/x/bank/internal/invariants" "github.com/cosmos/cosmos-sdk/x/bank/internal/types" ) @@ -38,8 +38,8 @@ var ( ValidateInputsOutputs = types.ValidateInputsOutputs ParamKeyTable = types.ParamKeyTable NewHandler = handler.NewHandler - SimulateMsgSend = simulation.SimulateMsgSend - SimulateSingleInputMsgMultiSend = simulation.SimulateSingleInputMsgMultiSend + SimulateMsgSend = invariants.SimulateMsgSend + SimulateSingleInputMsgMultiSend = invariants.SimulateSingleInputMsgMultiSend // variable aliases ModuleCdc = types.ModuleCdc diff --git a/x/bank/internal/handler/handler.go b/x/bank/internal/handler/handler.go index 2082bd3f19c6..d55ad56db25b 100644 --- a/x/bank/internal/handler/handler.go +++ b/x/bank/internal/handler/handler.go @@ -5,7 +5,6 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/bank/internal/keeper" - "github.com/cosmos/cosmos-sdk/x/bank/internal/tags" "github.com/cosmos/cosmos-sdk/x/bank/internal/types" ) @@ -37,9 +36,9 @@ func handleMsgSend(ctx sdk.Context, k keeper.Keeper, msg types.MsgSend) sdk.Resu } resTags := sdk.NewTags( - tags.Category, tags.TxCategory, - tags.Sender, msg.FromAddress.String(), - tags.Recipient, msg.ToAddress.String(), + types.Category, types.TxCategory, + types.Sender, msg.FromAddress.String(), + types.Recipient, msg.ToAddress.String(), ) return sdk.Result{ @@ -58,7 +57,7 @@ func handleMsgMultiSend(ctx sdk.Context, k keeper.Keeper, msg types.MsgMultiSend return err.Result() } - resTags = resTags.AppendTag(tags.Category, tags.TxCategory) + resTags = resTags.AppendTag(types.Category, types.TxCategory) return sdk.Result{ Tags: resTags, } diff --git a/x/bank/internal/simulation/msgs.go b/x/bank/internal/invariants/msgs.go similarity index 99% rename from x/bank/internal/simulation/msgs.go rename to x/bank/internal/invariants/msgs.go index 8cecd22fd19c..b8e122f256b6 100644 --- a/x/bank/internal/simulation/msgs.go +++ b/x/bank/internal/invariants/msgs.go @@ -1,4 +1,4 @@ -package simulation +package invariants import ( "fmt" diff --git a/x/bank/internal/keeper/keeper.go b/x/bank/internal/keeper/keeper.go index b7999d2faad5..718569fadaef 100644 --- a/x/bank/internal/keeper/keeper.go +++ b/x/bank/internal/keeper/keeper.go @@ -6,7 +6,6 @@ import ( sdk "github.com/cosmos/cosmos-sdk/types" "github.com/cosmos/cosmos-sdk/x/auth" - "github.com/cosmos/cosmos-sdk/x/bank/internal/tags" "github.com/cosmos/cosmos-sdk/x/bank/internal/types" "github.com/cosmos/cosmos-sdk/x/params" ) @@ -340,7 +339,7 @@ func inputOutputCoins(ctx sdk.Context, am auth.AccountKeeper, inputs []types.Inp } allTags = allTags.AppendTag( - tags.Sender, in.Address.String(), + types.Sender, in.Address.String(), ) } @@ -350,7 +349,7 @@ func inputOutputCoins(ctx sdk.Context, am auth.AccountKeeper, inputs []types.Inp return nil, err } allTags = allTags.AppendTag( - tags.Recipient, out.Address.String(), + types.Recipient, out.Address.String(), ) } @@ -386,7 +385,7 @@ func delegateCoins( setAccount(ctx, ak, acc) return sdk.NewTags( - sdk.TagAction, tags.ActionDelegateCoins, + sdk.TagAction, types.ActionDelegateCoins, sdk.TagDelegator, addr.String(), ), nil } @@ -411,7 +410,7 @@ func undelegateCoins( setAccount(ctx, ak, acc) return sdk.NewTags( - sdk.TagAction, tags.ActionUndelegateCoins, + sdk.TagAction, types.ActionUndelegateCoins, sdk.TagDelegator, addr.String(), ), nil } diff --git a/x/bank/internal/tags/tags.go b/x/bank/internal/types/tags.go similarity index 95% rename from x/bank/internal/tags/tags.go rename to x/bank/internal/types/tags.go index e7da0c3dde73..653fc04a7b27 100644 --- a/x/bank/internal/tags/tags.go +++ b/x/bank/internal/types/tags.go @@ -1,4 +1,4 @@ -package tags +package types import ( "github.com/cosmos/cosmos-sdk/types"