refactor(runtime/v2): simplify app manager (#22300)

This commit is contained in:
Julien Robert
2024-10-21 13:45:28 +00:00
committed by GitHub
parent 97d37ae243
commit 681366e346
22 changed files with 202 additions and 200 deletions
+2 -2
View File
@@ -218,8 +218,8 @@ func (app *SimApp[T]) TxConfig() client.TxConfig {
return app.txConfig
}
// GetStore returns the root store.
func (app *SimApp[T]) GetStore() store.RootStore {
// Store returns the root store.
func (app *SimApp[T]) Store() store.RootStore {
return app.store
}
+2 -2
View File
@@ -72,7 +72,7 @@ func NewTestApp(t *testing.T) (*SimApp[transaction.Tx], context.Context) {
genesisBytes, err := json.Marshal(genesis)
require.NoError(t, err)
st := app.GetStore()
st := app.Store()
ci, err := st.LastCommitID()
require.NoError(t, err)
@@ -108,7 +108,7 @@ func MoveNextBlock(t *testing.T, app *SimApp[transaction.Tx], ctx context.Contex
bz := sha256.Sum256([]byte{})
st := app.GetStore()
st := app.Store()
ci, err := st.LastCommitID()
require.NoError(t, err)
+1 -1
View File
@@ -29,7 +29,7 @@ func (app *SimApp[T]) ExportAppStateAndValidators(
return exportedApp, err
}
readerMap, err := app.GetStore().StateAt(latestHeight)
readerMap, err := app.Store().StateAt(latestHeight)
if err != nil {
return exportedApp, err
}