Skip to content

Commit

Permalink
fix upper bound of crypton-connection
Browse files Browse the repository at this point in the history
  • Loading branch information
larskuhtz committed Jun 30, 2024
1 parent bc4842d commit 4d5533a
Show file tree
Hide file tree
Showing 4 changed files with 7 additions and 5 deletions.
2 changes: 1 addition & 1 deletion chainweb.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -373,7 +373,7 @@ library
, chronos >= 1.1
, clock >= 0.7
, configuration-tools >= 0.6
, crypton-connection >= 0.2 && < 0.4
, crypton-connection >= 0.2
, containers >= 0.5
, crypton >= 0.31
, cuckoo >= 0.3
Expand Down
5 changes: 3 additions & 2 deletions src/Chainweb/Utils.hs
Original file line number Diff line number Diff line change
Expand Up @@ -249,6 +249,7 @@ import qualified Data.ByteString.Builder as BB
import qualified Data.ByteString.Lazy as BL
import qualified Data.Csv as CSV
import Data.Decimal
import Data.Default (def)
import Data.Functor.Of
import Data.Hashable
import qualified Data.HashMap.Strict as HM
Expand Down Expand Up @@ -1348,12 +1349,12 @@ manager micros = HTTP.newManager
unsafeManager :: Int -> IO HTTP.Manager
unsafeManager micros = HTTP.newTlsManagerWith
$ setManagerRequestTimeout micros
$ HTTP.mkManagerSettings (HTTP.TLSSettingsSimple True True True) Nothing
$ HTTP.mkManagerSettings (HTTP.TLSSettingsSimple True True True def) Nothing

Check failure on line 1352 in src/Chainweb/Utils.hs

View workflow job for this annotation

GitHub Actions / Build (9.6.5, 3.10, ubuntu-20.04, true)

• Couldn't match expected type ‘t1 -> HTTP.TLSSettings’

Check failure on line 1352 in src/Chainweb/Utils.hs

View workflow job for this annotation

GitHub Actions / Build (9.6.5, 3.10, ubuntu-22.04, true)

• Couldn't match expected type ‘t1 -> HTTP.TLSSettings’

unsafeManagerWithSettings :: (HTTP.ManagerSettings -> HTTP.ManagerSettings) -> IO HTTP.Manager
unsafeManagerWithSettings settings = HTTP.newTlsManagerWith
$ settings
$ HTTP.mkManagerSettings (HTTP.TLSSettingsSimple True True True) Nothing
$ HTTP.mkManagerSettings (HTTP.TLSSettingsSimple True True True def) Nothing

Check failure on line 1357 in src/Chainweb/Utils.hs

View workflow job for this annotation

GitHub Actions / Build (9.6.5, 3.10, ubuntu-20.04, true)

• Couldn't match expected type ‘t0 -> HTTP.TLSSettings’

Check failure on line 1357 in src/Chainweb/Utils.hs

View workflow job for this annotation

GitHub Actions / Build (9.6.5, 3.10, ubuntu-22.04, true)

• Couldn't match expected type ‘t0 -> HTTP.TLSSettings’

setManagerRequestTimeout :: Int -> HTTP.ManagerSettings -> HTTP.ManagerSettings
setManagerRequestTimeout micros settings = settings
Expand Down
3 changes: 2 additions & 1 deletion test/Chainweb/Test/Utils.hs
Original file line number Diff line number Diff line change
Expand Up @@ -137,6 +137,7 @@ import Data.Bifunctor hiding (second)
import qualified Data.ByteString as B
import qualified Data.ByteString.Lazy as BL
import Data.Coerce (coerce)
import Data.Default (def)
import Data.Foldable
import qualified Data.HashMap.Strict as HashMap
import Data.IORef
Expand Down Expand Up @@ -1132,7 +1133,7 @@ getClientEnv :: BaseUrl -> IO ClientEnv
getClientEnv url = flip mkClientEnv url <$> HTTP.newTlsManagerWith mgrSettings
where
mgrSettings = HTTP.mkManagerSettings
(HTTP.TLSSettingsSimple True False False)
(HTTP.TLSSettingsSimple True False False def)
Nothing

-- | Backoff up to a constant 250ms, limiting to ~40s
Expand Down
2 changes: 1 addition & 1 deletion tools/cwtool/TxSimulator.hs
Original file line number Diff line number Diff line change
Expand Up @@ -265,7 +265,7 @@ setupClient :: SimConfig -> IO ClientEnv
setupClient sc = flip mkClientEnv (scApiHostUrl sc) <$> newTlsManagerWith mgrSettings
where
mgrSettings = mkManagerSettings
(TLSSettingsSimple True False False)
(TLSSettingsSimple True False False def)
Nothing

-- | note, fetches [low - 1, hi] to have parent headers
Expand Down

0 comments on commit 4d5533a

Please sign in to comment.