Skip to content
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

fix: correct panic messages and enforce sealing check in SetStreamingManager #23951

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 5 additions & 2 deletions baseapp/options.go
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@ func (app *BaseApp) SetDB(db corestore.KVStoreWithBatch) {

func (app *BaseApp) SetCMS(cms storetypes.CommitMultiStore) {
if app.sealed {
panic("SetEndBlocker() on sealed BaseApp")
panic("SetCMS() on sealed BaseApp")
}

app.cms = cms
Expand Down Expand Up @@ -375,7 +375,7 @@ func (app *BaseApp) SetPrepareProposal(handler sdk.PrepareProposalHandler) {
// SetCheckTxHandler sets the checkTx function for the BaseApp.
func (app *BaseApp) SetCheckTxHandler(handler sdk.CheckTxHandler) {
if app.sealed {
panic("SetCheckTx() on sealed BaseApp")
panic("SetCheckTxHandler() on sealed BaseApp")
}

app.checkTxHandler = handler
Expand Down Expand Up @@ -408,6 +408,9 @@ func (app *BaseApp) SetStoreMetrics(gatherer metrics.StoreMetrics) {

// SetStreamingManager sets the streaming manager for the BaseApp.
func (app *BaseApp) SetStreamingManager(manager storetypes.StreamingManager) {
if app.sealed {
panic("SetStreamingManager() on sealed BaseApp")
}
app.streamingManager = manager
}

Expand Down
Loading