Skip to content

Commit

Permalink
enable CPP in TxSimulator
Browse files Browse the repository at this point in the history
Change-Id: I029b382a9c059f551152d752646c41c017aa278c
  • Loading branch information
chessai committed May 21, 2024
1 parent 14db858 commit e09b031
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 6 deletions.
1 change: 1 addition & 0 deletions chainweb.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -801,6 +801,7 @@ executable cwtool
, temporary >= 1.3
, time >= 1.9
, text >= 2.0
, tls >=1.9
, unliftio >= 0.2.25
, unordered-containers >= 0.2.16
, vector >= 0.12.2
Expand Down
13 changes: 7 additions & 6 deletions tools/cwtool/TxSimulator.hs
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
{-# LANGUAGE BangPatterns #-}
{-# LANGUAGE CPP #-}
{-# LANGUAGE FlexibleContexts #-}
{-# LANGUAGE LambdaCase #-}
{-# LANGUAGE OverloadedStrings #-}
Expand Down Expand Up @@ -273,14 +274,14 @@ setupClient sc = flip mkClientEnv (scApiHostUrl sc) <$> newTlsManagerWith mgrSet
(TLSSettingsSimple True False False)
Nothing

tlsSettingsSimple = TLSSettingsSimple
{ settingDisableCertificateValidation = True
, settingDisableSession = False
, settingUseServerName = False
tlsSettingsSimple = TLSSettingsSimple
{ settingDisableCertificateValidation = True
, settingDisableSession = False
, settingUseServerName = False
#if MIN_VERSION_crypton_connection(0,4,0)
, settingClientSupported = def { TLS.supportedCiphers = TLS.ciphersuite_default }
, settingClientSupported = def { TLS.supportedCiphers = TLS.ciphersuite_default }
#endif
}
}

-- | note, fetches [low - 1, hi] to have parent headers
fetchHeaders :: SimConfig -> ClientEnv -> IO [BlockHeader]
Expand Down

0 comments on commit e09b031

Please sign in to comment.