Skip to content

Commit 344f1ed

Browse files
committed
add p2p private true to replay tool
Change-Id: Ice72d4321b59ad5e1585b02e65019501a2345fcc
1 parent c8c3033 commit 344f1ed

File tree

2 files changed

+13
-3
lines changed

2 files changed

+13
-3
lines changed

replay/Main.hs

+12-3
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ import Data.Maybe (fromMaybe)
2424
import Data.Text (Text)
2525
import Data.Time.Format.ISO8601 (iso8601ParseM)
2626
import Options.Applicative qualified as O
27-
import P2P.Node.Configuration (defaultP2pConfiguration, p2pConfigBootstrapReachability, p2pConfigIgnoreBootstrapNodes)
27+
import P2P.Node.Configuration (defaultP2pConfiguration, p2pConfigBootstrapReachability, p2pConfigIgnoreBootstrapNodes, p2pConfigPrivate)
2828
import System.IO qualified as IO
2929
import System.LogLevel (LogLevel(..))
3030

@@ -53,10 +53,19 @@ mkReplayConfiguration cfg = defaultChainwebNodeConfiguration
5353
cwConfig = defaultChainwebConfiguration mainnet
5454
& configReadOnlyReplay .~ not cfg.noReadOnly
5555
& configOnlySyncPact .~ cfg.noReadOnly
56-
& configCuts .~ (defaultCutConfig & cutInitialBlockHeightLimit .~ cfg.initialBlockHeightLimit & cutFastForwardBlockHeightLimit .~ cfg.fastForwardBlockHeightLimit)
57-
& configP2p .~ (defaultP2pConfiguration & p2pConfigBootstrapReachability .~ 0 & p2pConfigIgnoreBootstrapNodes .~ True)
56+
& configCuts .~ cutConfig
57+
& configP2p .~ p2pConfig
5858
& configFullHistoricPactState .~ False
5959

60+
cutConfig = defaultCutConfig
61+
& cutInitialBlockHeightLimit .~ cfg.initialBlockHeightLimit
62+
& cutFastForwardBlockHeightLimit .~ cfg.fastForwardBlockHeightLimit
63+
64+
p2pConfig = defaultP2pConfiguration
65+
& p2pConfigBootstrapReachability .~ 0
66+
& p2pConfigIgnoreBootstrapNodes .~ True
67+
& p2pConfigPrivate .~ True
68+
6069
data Config = Config
6170
{ chainwebVersion :: ChainwebVersion
6271
, noReadOnly :: Bool

src/P2P/Node/Configuration.hs

+1
Original file line numberDiff line numberDiff line change
@@ -29,6 +29,7 @@ module P2P.Node.Configuration
2929
, p2pConfigKnownPeers
3030
, p2pConfigIgnoreBootstrapNodes
3131
, p2pConfigBootstrapReachability
32+
, p2pConfigPrivate
3233
, defaultP2pConfiguration
3334
, validateP2pConfiguration
3435
, pP2pConfiguration

0 commit comments

Comments
 (0)