Co-authored-by: Julien Robert <julien@rbrt.fr>
This commit is contained in:
parent
0a28ba9f3f
commit
72a6397f13
|
@ -47,6 +47,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
|
|||
|
||||
### Bug Fixes
|
||||
|
||||
* (server) [#17181](https://github.com/cosmos/cosmos-sdk/pull/17181) Fix `db_backend` lookup fallback from `config.toml`.
|
||||
* (runtime) [#17284](https://github.com/cosmos/cosmos-sdk/pull/17284) Properly allow to combine depinject-enabled modules and non-depinject-enabled modules in app v2.
|
||||
* (baseapp) [#17159](https://github.com/cosmos/cosmos-sdk/pull/17159) Validators can propose blocks that exceed the gas limit.
|
||||
* (baseapp) [#16547](https://github.com/cosmos/cosmos-sdk/pull/16547) Ensure a transaction's gas limit cannot exceed the block gas limit.
|
||||
|
|
|
@ -83,8 +83,7 @@ iavl-lazy-loading = {{ .BaseConfig.IAVLLazyLoading }}
|
|||
|
||||
# AppDBBackend defines the database backend type to use for the application and snapshots DBs.
|
||||
# An empty string indicates that a fallback will be used.
|
||||
# First fallback is the deprecated compile-time types.DBBackend value.
|
||||
# Second fallback (if the types.DBBackend also isn't set), is the db-backend value set in Tendermint's config.toml.
|
||||
# The fallback is the db_backend value set in Tendermint's config.toml.
|
||||
app-db-backend = "{{ .BaseConfig.AppDBBackend }}"
|
||||
|
||||
###############################################################################
|
||||
|
|
|
@ -392,7 +392,7 @@ func WaitForQuitSignals() ErrorCode {
|
|||
func GetAppDBBackend(opts types.AppOptions) dbm.BackendType {
|
||||
rv := cast.ToString(opts.Get("app-db-backend"))
|
||||
if len(rv) == 0 {
|
||||
rv = cast.ToString(opts.Get("db-backend"))
|
||||
rv = cast.ToString(opts.Get("db_backend"))
|
||||
}
|
||||
if len(rv) != 0 {
|
||||
return dbm.BackendType(rv)
|
||||
|
|
|
@ -10,8 +10,10 @@ import (
|
|||
"strings"
|
||||
"testing"
|
||||
|
||||
db "github.com/cometbft/cometbft-db"
|
||||
tmcfg "github.com/cometbft/cometbft/config"
|
||||
"github.com/spf13/cobra"
|
||||
"github.com/spf13/viper"
|
||||
"github.com/stretchr/testify/require"
|
||||
|
||||
"github.com/cosmos/cosmos-sdk/client"
|
||||
|
@ -38,6 +40,15 @@ func preRunETestImpl(cmd *cobra.Command, args []string) error {
|
|||
return cancelledInPreRun
|
||||
}
|
||||
|
||||
func TestGetAppDBBackend(t *testing.T) {
|
||||
v := viper.New()
|
||||
require.Equal(t, server.GetAppDBBackend(v), db.GoLevelDBBackend)
|
||||
v.Set("db_backend", "dbtype1") // value from CometBFT config
|
||||
require.Equal(t, server.GetAppDBBackend(v), db.BackendType("dbtype1"))
|
||||
v.Set("app-db-backend", "dbtype2") // value from app.toml
|
||||
require.Equal(t, server.GetAppDBBackend(v), db.BackendType("dbtype2"))
|
||||
}
|
||||
|
||||
func TestInterceptConfigsPreRunHandlerCreatesConfigFilesWhenMissing(t *testing.T) {
|
||||
tempDir := t.TempDir()
|
||||
cmd := server.StartCmd(nil, "/foobar")
|
||||
|
|
Loading…
Reference in New Issue