-
Notifications
You must be signed in to change notification settings - Fork 879
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
swamp: separate tendermint node creation from the swamp (#394)
* swamp: separate tendermint node creation from the swamp * add a config to set whatever app is needed from the test-case * move sync test from swamp dir to tests * adapt Makefile * add comments to config.go
- Loading branch information
Showing
4 changed files
with
59 additions
and
17 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,28 @@ | ||
package swamp | ||
|
||
import ( | ||
"time" | ||
|
||
"github.com/tendermint/tendermint/abci/types" | ||
tn "github.com/tendermint/tendermint/config" | ||
|
||
"github.com/celestiaorg/celestia-node/core" | ||
) | ||
|
||
// Config struct represents a set of pre-requisite attributes from the test scenario | ||
type Config struct { | ||
App types.Application | ||
CoreCfg *tn.Config | ||
} | ||
|
||
// DefaultConfig creates a KvStore with a block retention of 200 | ||
// In addition, the empty block interval is set to 200ms | ||
func DefaultConfig() *Config { | ||
app := core.CreateKvStore(200) | ||
tnCfg := tn.TestConfig() | ||
tnCfg.Consensus.CreateEmptyBlocksInterval = 200 * time.Millisecond | ||
return &Config{ | ||
App: app, | ||
CoreCfg: tnCfg, | ||
} | ||
} |
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