Skip to content

Commit

Permalink
fixup! feat(cosmic-swingset): basic snapshot wiring
Browse files Browse the repository at this point in the history
Handle SimApp not getting snapshotManager wired
  • Loading branch information
mhofman committed Mar 24, 2023
1 parent 139f659 commit e68df6d
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions golang/cosmos/app/app.go
Original file line number Diff line number Diff line change
Expand Up @@ -761,9 +761,11 @@ func NewAgoricApp(
app.ScopedVibcKeeper = scopedVibcKeeper
app.ScopedTransferKeeper = scopedTransferKeeper
app.ScopedICAHostKeeper = scopedICAHostKeeper
err = app.SnapshotManager().RegisterExtensions(&app.SwingSetSnapshotter)
if err != nil {
panic(fmt.Errorf("failed to register snapshot extension: %s", err))
snapshotManager := app.SnapshotManager()
if snapshotManager != nil {
if err = snapshotManager.RegisterExtensions(&app.SwingSetSnapshotter); err != nil {
panic(fmt.Errorf("failed to register snapshot extension: %s", err))
}
}

return app
Expand Down

0 comments on commit e68df6d

Please sign in to comment.