Skip to content

Commit

Permalink
Merge branch 'main' into dependabot/go_modules/cosmossdk.io/errors-1.0.1
Browse files Browse the repository at this point in the history
  • Loading branch information
SpicyLemon authored Jan 11, 2024
2 parents 3f8b791 + 8823024 commit fd1cc1d
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 5 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,7 @@ Ref: https://keepachangelog.com/en/1.0.0/
* Create a default market in `make run`, `localnet`, `devnet` and the `provenanced testnet` command [#1757](https://github.com/provenance-io/provenance/issues/1757).
* Remove the rust upgrade handlers [PR 1774](https://github.com/provenance-io/provenance/pull/1774).
* Add StoreLoader wrapper to check configuration settings [#1792](https://github.com/provenance-io/provenance/pull/1792).
* Set the default `iavl-disable-fastnode` value to `false` and the default `tx_index.indexer` value to `"null"` [#1807](https://github.com/provenance-io/provenance/pull/1807).

### Bug Fixes

Expand Down
4 changes: 2 additions & 2 deletions app/store_loader.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@ func ValidateWrapper(logger log.Logger, appOpts servertypes.AppOptions, storeLoa
errs = append(errs, fmt.Sprintf("pruning-interval %d EXCEEDS %d AND IS NOT RECOMMENDED, AS IT CAN LEAD TO MISSED BLOCKS ON VALIDATORS", interval, MaxPruningInterval))
}

if indexer != "" {
errs = append(errs, fmt.Sprintf("indexer \"%s\" IS NOT RECOMMENDED, AND IT IS RECOMMENDED TO USE \"%s\"", indexer, ""))
if indexer != "" && indexer != "null" {
errs = append(errs, fmt.Sprintf("indexer \"%s\" IS NOT RECOMMENDED, AND IT IS RECOMMENDED TO USE \"%s\"", indexer, "null"))
}

if fastNode {
Expand Down
18 changes: 15 additions & 3 deletions app/store_loader_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4,12 +4,14 @@ import (
"testing"
"time"

"github.com/cosmos/cosmos-sdk/baseapp"
"github.com/cosmos/cosmos-sdk/store/rootmulti"
sdk "github.com/cosmos/cosmos-sdk/types"
"github.com/stretchr/testify/assert"

"github.com/tendermint/tendermint/libs/log"
dbm "github.com/tendermint/tm-db"

"github.com/cosmos/cosmos-sdk/baseapp"
"github.com/cosmos/cosmos-sdk/store/rootmulti"
sdk "github.com/cosmos/cosmos-sdk/types"
)

func TestWrapStoreLoader(t *testing.T) {
Expand Down Expand Up @@ -67,6 +69,16 @@ func TestValidateWrapper(t *testing.T) {
}{
{
name: "recommended pruning, indexer, db, and fastnode should not wait",
appOpts: MockAppOptions{
pruning: "13",
db: "goleveldb",
fastNode: "false",
indexer: "null",
},
delta: 0,
},
{
name: "recommended pruning, db, and fastnode and empty indexer should not wait",
appOpts: MockAppOptions{
pruning: "13",
db: "goleveldb",
Expand Down
2 changes: 2 additions & 0 deletions cmd/provenanced/config/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -90,6 +90,7 @@ func ExtractAppConfigAndMap(cmd *cobra.Command) (*serverconfig.Config, FieldValu
func DefaultAppConfig() *serverconfig.Config {
rv := serverconfig.DefaultConfig()
rv.MinGasPrices = pioconfig.GetProvenanceConfig().ProvenanceMinGasPrices
rv.IAVLDisableFastNode = false
return rv
}

Expand Down Expand Up @@ -125,6 +126,7 @@ func ExtractTmConfigAndMap(cmd *cobra.Command) (*tmconfig.Config, FieldValueMap,
func DefaultTmConfig() *tmconfig.Config {
rv := tmconfig.DefaultConfig()
rv.Consensus.TimeoutCommit = DefaultConsensusTimeoutCommit
rv.TxIndex.Indexer = "null"
return rv
}

Expand Down

0 comments on commit fd1cc1d

Please sign in to comment.