-
Notifications
You must be signed in to change notification settings - Fork 607
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
chore: cleanup unused globals #8804
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -63,7 +63,7 @@ func NewAppConstructor(chainId string) network.AppConstructor { | |
return NewOsmosisApp( | ||
valCtx.Logger, dbm.NewMemDB(), nil, true, make(map[int64]bool), valCtx.Config.RootDir, 0, | ||
sims.EmptyAppOptions{}, | ||
EmptyWasmOpts, | ||
nil, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Codebase verification Inconsistent usage of The change from
🔗 Analysis chainLGTM! Verify consistent usage across the codebase. The change from Let's verify that this change is consistent across the codebase and that all callers properly handle nil: 🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Description: Verify that EmptyWasmOpts is completely removed and all NewOsmosisApp calls use nil
# Test 1: Ensure EmptyWasmOpts is removed
rg "EmptyWasmOpts"
# Test 2: Check all NewOsmosisApp calls to ensure they use nil
ast-grep --pattern 'NewOsmosisApp($$$)'
Length of output: 1288 |
||
baseapp.SetMinGasPrices(appConfig.MinGasPrices), | ||
baseapp.SetChainID(chainId), | ||
) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,7 +13,7 @@ import ( | |
|
||
func TestOrderEndBlockers_Determinism(t *testing.T) { | ||
db := dbm.NewMemDB() | ||
app := NewOsmosisApp(log.NewNopLogger(), db, nil, true, map[int64]bool{}, DefaultNodeHome, 5, sims.EmptyAppOptions{}, EmptyWasmOpts, baseapp.SetChainID("osmosis-1")) | ||
app := NewOsmosisApp(log.NewNopLogger(), db, nil, true, map[int64]bool{}, DefaultNodeHome, 5, sims.EmptyAppOptions{}, nil, baseapp.SetChainID("osmosis-1")) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Codebase verification Inconsistent usage found in The change from
app := osmosis.NewOsmosisApp(logger, db, traceStore, loadLatest, map[int64]bool{}, homeDir, 0, appOpts, osmosis.EmptyWasmOpts) 🔗 Analysis chainLGTM! Verify consistency across the codebase. The change from Let's verify that this change is consistent across all 🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Description: Check for any remaining instances of EmptyWasmOpts
# to ensure consistent replacement with nil
# Search for any remaining EmptyWasmOpts usage
rg "EmptyWasmOpts"
# Search for NewOsmosisApp calls to verify nil usage
ast-grep --pattern 'NewOsmosisApp($$$)'
Length of output: 1288 |
||
|
||
for i := 0; i < 1000; i++ { | ||
a := OrderEndBlockers(app.mm.ModuleNames()) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -358,7 +358,7 @@ func NewRootCmd() (*cobra.Command, params.EncodingConfig) { | |
WithViper("OSMOSIS") | ||
|
||
tempDir := tempDir() | ||
tempApp := osmosis.NewOsmosisApp(log.NewNopLogger(), cosmosdb.NewMemDB(), nil, true, map[int64]bool{}, tempDir, 5, sims.EmptyAppOptions{}, osmosis.EmptyWasmOpts, baseapp.SetChainID("osmosis-1")) | ||
tempApp := osmosis.NewOsmosisApp(log.NewNopLogger(), cosmosdb.NewMemDB(), nil, true, map[int64]bool{}, tempDir, 5, sims.EmptyAppOptions{}, nil, baseapp.SetChainID("osmosis-1")) | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Codebase verification Inconsistent usage found: The verification revealed that
🔗 Analysis chainLGTM! Verify consistent usage of The change from Let's verify that this change is consistently applied across the codebase: 🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Search for any remaining usage of EmptyWasmOpts
rg "EmptyWasmOpts"
# Search for NewOsmosisApp calls to verify nil usage pattern
ast-grep --pattern 'NewOsmosisApp($$$, $_, $$$)'
Length of output: 1297 There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Codebase verification Inconsistent usage of There's still one instance in
This inconsistency should be addressed by replacing 🔗 Analysis chainLGTM! Verify consistency of The replacement of Let's verify that this change is consistent across the codebase: 🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Search for any remaining usage of EmptyWasmOpts
rg "EmptyWasmOpts"
# Search for NewOsmosisApp calls to ensure consistent nil usage
rg "NewOsmosisApp.*\(" -A 1
Length of output: 1895 |
||
defer func() { | ||
if err := tempApp.Close(); err != nil { | ||
panic(err) | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -24,7 +24,7 @@ func OsmosisAppCreator(logger log.Logger, db db.DB) simtypes.AppCreator { | |
homepath, | ||
legacyInvariantPeriod, | ||
emptyAppOptions{}, | ||
app.EmptyWasmOpts, | ||
nil, | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 💡 Codebase verification Found inconsistency: The change to use
🔗 Analysis chainLGTM! The change aligns with the cleanup objectives. The replacement of Let's verify that this change is consistent across the codebase: 🏁 Scripts executedThe following scripts were executed for the analysis: Script: #!/bin/bash
# Description: Verify that EmptyWasmOpts is not used anywhere else in the codebase
# and that NewOsmosisApp calls consistently use nil for this parameter
# Test 1: Check for any remaining usage of EmptyWasmOpts
rg "EmptyWasmOpts"
# Test 2: Check the pattern of NewOsmosisApp usage
ast-grep --pattern 'NewOsmosisApp($$$)'
Length of output: 1288 |
||
baseappOptions...) | ||
} | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think this was mistakenly removed?