Skip to content

Commit

Permalink
add p2p private true to replay tool
Browse files Browse the repository at this point in the history
Change-Id: Ice72d4321b59ad5e1585b02e65019501a2345fcc
  • Loading branch information
chessai committed Jul 24, 2024
1 parent c8c3033 commit 344f1ed
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
15 changes: 12 additions & 3 deletions replay/Main.hs
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import Data.Maybe (fromMaybe)
import Data.Text (Text)
import Data.Time.Format.ISO8601 (iso8601ParseM)
import Options.Applicative qualified as O
import P2P.Node.Configuration (defaultP2pConfiguration, p2pConfigBootstrapReachability, p2pConfigIgnoreBootstrapNodes)
import P2P.Node.Configuration (defaultP2pConfiguration, p2pConfigBootstrapReachability, p2pConfigIgnoreBootstrapNodes, p2pConfigPrivate)
import System.IO qualified as IO
import System.LogLevel (LogLevel(..))

Expand Down Expand Up @@ -53,10 +53,19 @@ mkReplayConfiguration cfg = defaultChainwebNodeConfiguration
cwConfig = defaultChainwebConfiguration mainnet
& configReadOnlyReplay .~ not cfg.noReadOnly
& configOnlySyncPact .~ cfg.noReadOnly
& configCuts .~ (defaultCutConfig & cutInitialBlockHeightLimit .~ cfg.initialBlockHeightLimit & cutFastForwardBlockHeightLimit .~ cfg.fastForwardBlockHeightLimit)
& configP2p .~ (defaultP2pConfiguration & p2pConfigBootstrapReachability .~ 0 & p2pConfigIgnoreBootstrapNodes .~ True)
& configCuts .~ cutConfig
& configP2p .~ p2pConfig
& configFullHistoricPactState .~ False

cutConfig = defaultCutConfig
& cutInitialBlockHeightLimit .~ cfg.initialBlockHeightLimit
& cutFastForwardBlockHeightLimit .~ cfg.fastForwardBlockHeightLimit

p2pConfig = defaultP2pConfiguration
& p2pConfigBootstrapReachability .~ 0
& p2pConfigIgnoreBootstrapNodes .~ True
& p2pConfigPrivate .~ True

data Config = Config
{ chainwebVersion :: ChainwebVersion
, noReadOnly :: Bool
Expand Down
1 change: 1 addition & 0 deletions src/P2P/Node/Configuration.hs
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@ module P2P.Node.Configuration
, p2pConfigKnownPeers
, p2pConfigIgnoreBootstrapNodes
, p2pConfigBootstrapReachability
, p2pConfigPrivate
, defaultP2pConfiguration
, validateP2pConfiguration
, pP2pConfiguration
Expand Down

0 comments on commit 344f1ed

Please sign in to comment.