From 5bf3ab6d07293681710bace6870c7ac83e2a4227 Mon Sep 17 00:00:00 2001 From: likhita-809 Date: Wed, 20 Sep 2023 14:56:09 +0530 Subject: [PATCH] cleanup --- x/distribution/keeper/migrations.go | 2 ++ x/distribution/keeper/msg_server.go | 4 ++++ x/pool/README.md | 2 +- 3 files changed, 7 insertions(+), 1 deletion(-) diff --git a/x/distribution/keeper/migrations.go b/x/distribution/keeper/migrations.go index 518f39669c89..589c938bc013 100644 --- a/x/distribution/keeper/migrations.go +++ b/x/distribution/keeper/migrations.go @@ -10,6 +10,8 @@ import ( "github.com/cosmos/cosmos-sdk/x/distribution/types" ) +const poolModuleName = "protocol-pool" + // Migrator is a struct for handling in-place store migrations. type Migrator struct { keeper Keeper diff --git a/x/distribution/keeper/msg_server.go b/x/distribution/keeper/msg_server.go index 5d503d217c52..179406fabdbf 100644 --- a/x/distribution/keeper/msg_server.go +++ b/x/distribution/keeper/msg_server.go @@ -104,6 +104,8 @@ func (k msgServer) WithdrawValidatorCommission(ctx context.Context, msg *types.M return &types.MsgWithdrawValidatorCommissionResponse{Amount: amount}, nil } +// NOTE: DO NOT USE +// This method uses deprecated messages. Use FundCommunityPool from x/pool module instead. func (k msgServer) FundCommunityPool(ctx context.Context, msg *types.MsgFundCommunityPool) (*types.MsgFundCommunityPoolResponse, error) { //nolint:staticcheck // we're using a deprecated call for compatibility sdkCtx := sdk.UnwrapSDKContext(ctx) @@ -159,6 +161,8 @@ func (k msgServer) UpdateParams(ctx context.Context, msg *types.MsgUpdateParams) return &types.MsgUpdateParamsResponse{}, nil } +// NOTE: DO NOT USE +// This method uses deprecated messages. Use CommunityPoolSpend from x/pool module instead. func (k msgServer) CommunityPoolSpend(ctx context.Context, msg *types.MsgCommunityPoolSpend) (*types.MsgCommunityPoolSpendResponse, error) { //nolint:staticcheck // we're using a deprecated call for compatibility sdkCtx := sdk.UnwrapSDKContext(ctx) diff --git a/x/pool/README.md b/x/pool/README.md index d345194bf859..f0a299a9a7a4 100644 --- a/x/pool/README.md +++ b/x/pool/README.md @@ -4,4 +4,4 @@ sidebar_position: 1 # `x/pool` -Functionality to handle community pool funds. This provides a separate module account for community pool making it easier to track the pool assets. \ No newline at end of file +Functionality to handle community pool funds. This provides a separate module account for community pool making it easier to track the pool assets. We no longer track community pool assets in distribution module, but instead in this pool module. Funds are migrated from the distribution module's community pool to pool's module account. \ No newline at end of file