-
Notifications
You must be signed in to change notification settings - Fork 202
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor(db): use pebbledb as the default db in integration tests (#1979
- Loading branch information
1 parent
d78385b
commit c0053ef
Showing
11 changed files
with
83 additions
and
44 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,30 @@ | ||
package appconst | ||
|
||
import ( | ||
"time" | ||
|
||
tmcfg "github.com/cometbft/cometbft/config" | ||
) | ||
|
||
// NewDefaultTendermintConfig returns a consensus "Config" (CometBFT) with new | ||
// default values for the "consensus" and "db_backend" fields to be enforced upon | ||
// node initialization. See the "nibiru/cmd/nibid/cmd/InitCmd" function for more | ||
// information. | ||
func NewDefaultTendermintConfig() *tmcfg.Config { | ||
cfg := tmcfg.DefaultConfig() | ||
|
||
// Overwrite consensus config | ||
ms := func(n time.Duration) time.Duration { | ||
return n * time.Millisecond | ||
} | ||
cfg.Consensus.TimeoutPropose = ms(3_000) | ||
cfg.Consensus.TimeoutProposeDelta = ms(500) | ||
cfg.Consensus.TimeoutPrevote = ms(1_000) | ||
cfg.Consensus.TimeoutPrevoteDelta = ms(500) | ||
cfg.Consensus.TimeoutPrecommit = ms(1_000) | ||
cfg.Consensus.TimeoutPrecommitDelta = ms(500) | ||
cfg.Consensus.TimeoutCommit = ms(1_000) | ||
|
||
cfg.DBBackend = string(DefaultDBBackend) | ||
return cfg | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
//go:build pebbledb | ||
// +build pebbledb | ||
|
||
package appconst | ||
|
||
func init() { | ||
HavePebbleDBBuildTag = true | ||
} |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters