refactor!: abstractions for snapshot and pruning; snapshot intervals eventually pruned; unit tests (#11496)

This commit is contained in:
Roman
2022-04-21 15:30:36 -04:00
committed by GitHub
parent d4dd44469f
commit 42f8d45b68
57 changed files with 2643 additions and 638 deletions
+4 -8
View File
@@ -9,10 +9,6 @@ import (
"github.com/cosmos/cosmos-sdk/types/kv"
)
type (
PruningOptions = types.PruningOptions
)
type (
Store = types.Store
Committer = types.Committer
@@ -155,15 +151,15 @@ type (
GasConfig = types.GasConfig
)
func NewGasMeter(limit Gas) GasMeter {
return types.NewGasMeter(limit)
}
type (
ErrorOutOfGas = types.ErrorOutOfGas
ErrorGasOverflow = types.ErrorGasOverflow
)
func NewGasMeter(limit Gas) GasMeter {
return types.NewGasMeter(limit)
}
func NewInfiniteGasMeter() GasMeter {
return types.NewInfiniteGasMeter()
}
+2 -1
View File
@@ -4,6 +4,7 @@ import (
"testing"
"github.com/stretchr/testify/suite"
"github.com/tendermint/tendermint/libs/log"
dbm "github.com/tendermint/tm-db"
"github.com/cosmos/cosmos-sdk/store/rootmulti"
@@ -108,7 +109,7 @@ func (s *storeTestSuite) TestDiffKVStores() {
func (s *storeTestSuite) initTestStores() (types.KVStore, types.KVStore) {
db := dbm.NewMemDB()
ms := rootmulti.NewStore(db)
ms := rootmulti.NewStore(db, log.NewNopLogger())
key1 := types.NewKVStoreKey("store1")
key2 := types.NewKVStoreKey("store2")