Skip to content

Commit

Permalink
remove noop code that merge nil tracing context
Browse files Browse the repository at this point in the history
The semantic of `SetTracingContext`'s implementation is merging,
merging a nil map is a noop, so this code seems do nothing.
  • Loading branch information
yihuang committed Mar 29, 2024
1 parent 6972e00 commit 63a1b65
Show file tree
Hide file tree
Showing 2 changed files with 1 addition and 4 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
4 changes: 0 additions & 4 deletions baseapp/abci.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 63a1b65

Please sign in to comment.