feat: replace the cosmos-db.DB interface with core/store interface (backport #21450) (#21490)

Co-authored-by: Julien Robert <julien@rbrt.fr>
This commit is contained in:
mergify[bot]
2024-09-06 10:30:01 +00:00
committed by GitHub
co-authored by Julien Robert
parent 8ce77cbb24
commit 889becd2c0
78 changed files with 996 additions and 981 deletions
+2 -1
View File
@@ -12,6 +12,7 @@ import (
dbm "github.com/cosmos/cosmos-db"
coreheader "cosmossdk.io/core/header"
corestore "cosmossdk.io/core/store"
"cosmossdk.io/depinject"
sdkmath "cosmossdk.io/math"
banktypes "cosmossdk.io/x/bank/types"
@@ -83,7 +84,7 @@ type StartupConfig struct {
BaseAppOption runtime.BaseAppOption
AtGenesis bool
GenesisAccounts []GenesisAccount
DB dbm.DB
DB corestore.KVStoreWithBatch
}
func DefaultStartUpConfig() StartupConfig {
+2 -1
View File
@@ -9,6 +9,7 @@ import (
dbm "github.com/cosmos/cosmos-db"
corestore "cosmossdk.io/core/store"
"cosmossdk.io/log"
storetypes "cosmossdk.io/store/types"
@@ -24,7 +25,7 @@ import (
// SetupSimulation creates the config, db (levelDB), temporary directory and logger for the simulation tests.
// If `skip` is false it skips the current test. `skip` should be set using the `FlagEnabledValue` flag.
// Returns error on an invalid db instantiation or temp dir creation.
func SetupSimulation(config simtypes.Config, dirPrefix, dbName string, verbose, skip bool) (dbm.DB, string, log.Logger, bool, error) {
func SetupSimulation(config simtypes.Config, dirPrefix, dbName string, verbose, skip bool) (corestore.KVStoreWithBatch, string, log.Logger, bool, error) {
if !skip {
return nil, "", nil, true, nil
}