From 72ed9c5879a7e9edbb285533ee0decdc3542bc80 Mon Sep 17 00:00:00 2001 From: yihuang Date: Wed, 23 Oct 2024 12:23:26 +0800 Subject: [PATCH] Update CHANGELOG.md Signed-off-by: yihuang --- CHANGELOG.md | 2 +- x/bank/keeper/send.go | 4 ++-- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 2c94d226505d..29131258be5c 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -54,7 +54,7 @@ Ref: https://keepachangelog.com/en/1.0.0/ * [#261](https://github.com/crypto-org-chain/cosmos-sdk/pull/261) `ctx.BlockHeader` don't do protobuf deep copy, shallow copy seems enough, reduce scope of mutex in `PriorityNonceMempool.Remove`. * [#507](https://github.com/crypto-org-chain/cosmos-sdk/pull/507) mempool respect gas wanted returned by ante handler * [#744](https://github.com/crypto-org-chain/cosmos-sdk/pull/744) Pass raw transactions to tx executor so it can do pre-estimations. -* [#]() Optimize subUnlockedCoins implementation. +* [#865](https://github.com/crypto-org-chain/cosmos-sdk/pull/865) Optimize subUnlockedCoins implementation. ## [Unreleased] diff --git a/x/bank/keeper/send.go b/x/bank/keeper/send.go index 200eb11d5cb8..a69a45a3619c 100644 --- a/x/bank/keeper/send.go +++ b/x/bank/keeper/send.go @@ -8,7 +8,7 @@ import ( "cosmossdk.io/core/store" errorsmod "cosmossdk.io/errors" "cosmossdk.io/log" - sdkmath "cosmossdk.io/math" + "cosmossdk.io/math" storetypes "cosmossdk.io/store/types" "github.com/cosmos/cosmos-sdk/codec" @@ -295,7 +295,7 @@ func (k BaseSendKeeper) subUnlockedCoins(ctx context.Context, addr sdk.AccAddres ) } - newBalance := sdk.UnsafeNewCoin(coin.Denom, sdkmath.NewIntFromBigIntMut(balance.Sub(balance, amount))) + newBalance := sdk.UnsafeNewCoin(coin.Denom, math.NewIntFromBigIntMut(balance.Sub(balance, amount))) if err := k.setBalance(ctx, addr, newBalance); err != nil { return err }