Skip to content

Commit

Permalink
chore: overwrite default cometbft timeout_commit (#438)
Browse files Browse the repository at this point in the history
Co-authored-by: John Letey <[email protected]>
  • Loading branch information
boojamya and johnletey authored Dec 4, 2024
1 parent 3186b2b commit 720ab6f
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 3 deletions.
7 changes: 6 additions & 1 deletion cmd/root.go
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,8 @@
package cmd

import (
"time"

cmtcfg "github.com/cometbft/cometbft/config"
"github.com/cosmos/cosmos-sdk/client"
"github.com/cosmos/cosmos-sdk/client/config"
Expand Down Expand Up @@ -70,8 +72,11 @@ func NewRootCmd() *cobra.Command {
srvCfg := serverconfig.DefaultConfig()
srvCfg.MinGasPrices = "0uusdc,0ausdy,0ueure"
srvCfg.API.Enable = true
// overwrite default commit timeout from the cometbft configuration
cmtCfg := cmtcfg.DefaultConfig()
cmtCfg.Consensus.TimeoutCommit = 500 * time.Millisecond

return server.InterceptConfigsPreRunHandler(cmd, serverconfig.DefaultConfigTemplate, srvCfg, cmtcfg.DefaultConfig())
return server.InterceptConfigsPreRunHandler(cmd, serverconfig.DefaultConfigTemplate, srvCfg, cmtCfg)
},
}

Expand Down
2 changes: 0 additions & 2 deletions local.sh
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,6 @@ if ! [ -f .duke/data/priv_validator_state.json ]; then

nobled genesis gentx validator 1000000ustake --chain-id "duke-1" --home .duke --keyring-backend test &> /dev/null
nobled genesis collect-gentxs --home .duke &> /dev/null

sed -i '' 's/timeout_commit = "5s"/timeout_commit = "1s"/g' .duke/config/config.toml
fi

nobled start --home .duke

0 comments on commit 720ab6f

Please sign in to comment.