From 63a1b659848d895d6d080ab74b6d0924234192aa Mon Sep 17 00:00:00 2001 From: yihuang Date: Thu, 28 Mar 2024 16:29:52 +0800 Subject: [PATCH] remove noop code that merge nil tracing context The semantic of `SetTracingContext`'s implementation is merging, merging a nil map is a noop, so this code seems do nothing. --- CHANGELOG.md | 1 + baseapp/abci.go | 4 ---- 2 files changed, 1 insertion(+), 4 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 6c8069f4e79f..72717402c74f 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -89,6 +89,7 @@ Every module contains its own CHANGELOG.md. Please refer to the module you are i * (types) [#18963](https://github.com/cosmos/cosmos-sdk/pull/18963) Swap out amino json encoding of `ABCIMessageLogs` for std lib json encoding * (x/auth) [#19651](https://github.com/cosmos/cosmos-sdk/pull/19651) Allow empty public keys in `GetSignBytesAdapter`. * (x/genutil) [#19735](https://github.com/cosmos/cosmos-sdk/pull/19735) Update genesis api to match new `appmodule.HasGenesis` interface. +* (baseapp) [#19893](https://github.com/cosmos/cosmos-sdk/pull/19893) Remove the noop code that merge empty tracing context. ### Bug Fixes diff --git a/baseapp/abci.go b/baseapp/abci.go index e54824f41e0f..eb1d62cf6798 100644 --- a/baseapp/abci.go +++ b/baseapp/abci.go @@ -833,10 +833,6 @@ func (app *BaseApp) internalFinalizeBlock(ctx context.Context, req *abci.Request txResults = append(txResults, response) } - if app.finalizeBlockState.ms.TracingEnabled() { - app.finalizeBlockState.ms = app.finalizeBlockState.ms.SetTracingContext(nil).(storetypes.CacheMultiStore) - } - endBlock, err := app.endBlock(app.finalizeBlockState.Context()) if err != nil { return nil, err