diff --git a/build/config/config1.json b/build/config/config1.json index f174ea84d1..9d5eec7f1b 100644 --- a/build/config/config1.json +++ b/build/config/config1.json @@ -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": { diff --git a/build/config/config2.json b/build/config/config2.json index dc5de3b9c3..2e3dd51b5d 100644 --- a/build/config/config2.json +++ b/build/config/config2.json @@ -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": { diff --git a/build/config/config3.json b/build/config/config3.json index 5b44e1b9e9..a7e2033dbb 100644 --- a/build/config/config3.json +++ b/build/config/config3.json @@ -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": { diff --git a/build/config/config4.json b/build/config/config4.json index 5593c36603..bf0ac6b4d4 100644 --- a/build/config/config4.json +++ b/build/config/config4.json @@ -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": { diff --git a/runtime/configs/config.go b/runtime/configs/config.go index 8be6085142..b1317e1357 100644 --- a/runtime/configs/config.go +++ b/runtime/configs/config.go @@ -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"` @@ -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{ diff --git a/runtime/defaults/defaults.go b/runtime/defaults/defaults.go index fb35ed60aa..7f56b47577 100644 --- a/runtime/defaults/defaults.go +++ b/runtime/defaults/defaults.go @@ -18,6 +18,7 @@ const ( var ( DefaultRemoteCLIURL = fmt.Sprintf("http://%s:%s", DefaultRPCHost, DefaultRPCPort) + DefaultUseLibp2p = false // consensus DefaultConsensusMaxMempoolBytes = uint64(500000000) diff --git a/runtime/manager_test.go b/runtime/manager_test.go index 57dec5e252..22c0db67e7 100644 --- a/runtime/manager_test.go +++ b/runtime/manager_test.go @@ -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,