Skip to content

Commit

Permalink
chore: add use_libp2p config field
Browse files Browse the repository at this point in the history
  • Loading branch information
bryanchriswhite committed Feb 22, 2023
1 parent 7164ff7 commit 2bd341e
Show file tree
Hide file tree
Showing 7 changed files with 8 additions and 0 deletions.
1 change: 1 addition & 0 deletions build/config/config1.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"root_directory": "/go/src/github.com/pocket-network",
"private_key": "0ca1a40ddecdab4f5b04fa0bfed1d235beaa2b8082e7554425607516f0862075dfe357de55649e6d2ce889acf15eb77e94ab3c5756fe46d3c7538d37f27f115e",
"use_lib_p2p": false,
"consensus": {
"max_mempool_bytes": 500000000,
"pacemaker_config": {
Expand Down
1 change: 1 addition & 0 deletions build/config/config2.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"root_directory": "/go/src/github.com/pocket-network",
"private_key": "ba81e6e56d293895b299bc495ae75d490644429a5e0028fabeb5e1871c1098e7eb2c78364525a210d994a83e02d18b4287ab81f6670cf4510ab6c9f51e296d91",
"use_lib_p2p": false,
"consensus": {
"max_mempool_bytes": 500000000,
"pacemaker_config": {
Expand Down
1 change: 1 addition & 0 deletions build/config/config3.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"root_directory": "/go/src/github.com/pocket-network",
"private_key": "25b385b367a827eaafcdb1003bd17a25f2ecc0d10d41f138846f52ae1015aa941041a9c76539791fef9bee5b4fcd5bf4a1a489e0790c44cbdfa776b901e13b50",
"use_lib_p2p": false,
"consensus": {
"max_mempool_bytes": 500000000,
"pacemaker_config": {
Expand Down
1 change: 1 addition & 0 deletions build/config/config4.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
{
"root_directory": "/go/src/github.com/pocket-network",
"private_key": "4ff3292ff14213149446f8208942b35439cb4b2c5e819f41fb612e880b5614bdd6cea8706f6ee6672c1e013e667ec8c46231e0e7abcf97ba35d89fceb8edae45",
"use_lib_p2p": false,
"consensus": {
"max_mempool_bytes": 500000000,
"pacemaker_config": {
Expand Down
2 changes: 2 additions & 0 deletions runtime/configs/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ type Config struct {
RootDirectory string `json:"root_directory"`
PrivateKey string `json:"private_key"` // INVESTIGATE(#150): better architecture for key management (keybase, keyfiles, etc.)
ClientDebugMode bool `json:"client_debug_mode"`
UseLibP2P bool `json:"use_lib_p2p"` // Determines if `root/libp2p` or `root/p2p` should be used as the p2p module

Consensus *ConsensusConfig `json:"consensus"`
Utility *UtilityConfig `json:"utility"`
Expand All @@ -19,6 +20,7 @@ type Config struct {
func NewDefaultConfig(options ...func(*Config)) *Config {
cfg := &Config{
RootDirectory: "/go/src/github.com/pocket-network",
UseLibP2P: defaults.DefaultUseLibp2p,
Consensus: &ConsensusConfig{
MaxMempoolBytes: defaults.DefaultConsensusMaxMempoolBytes,
PacemakerConfig: &PacemakerConfig{
Expand Down
1 change: 1 addition & 0 deletions runtime/defaults/defaults.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ const (

var (
DefaultRemoteCLIURL = fmt.Sprintf("http://%s:%s", DefaultRPCHost, DefaultRPCPort)
DefaultUseLibp2p = false

// consensus
DefaultConsensusMaxMempoolBytes = uint64(500000000)
Expand Down
1 change: 1 addition & 0 deletions runtime/manager_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -4181,6 +4181,7 @@ func TestNewManagerFromReaders(t *testing.T) {
config: &configs.Config{
RootDirectory: "/go/src/github.com/pocket-network",
PrivateKey: "0ca1a40ddecdab4f5b04fa0bfed1d235beaa2b8082e7554425607516f0862075dfe357de55649e6d2ce889acf15eb77e94ab3c5756fe46d3c7538d37f27f115e",
UseLibP2P: false,
Consensus: &configs.ConsensusConfig{
PrivateKey: "0ca1a40ddecdab4f5b04fa0bfed1d235beaa2b8082e7554425607516f0862075dfe357de55649e6d2ce889acf15eb77e94ab3c5756fe46d3c7538d37f27f115e",
MaxMempoolBytes: 500000000,
Expand Down

0 comments on commit 2bd341e

Please sign in to comment.