Skip to content

Commit

Permalink
Disable mainnet
Browse files Browse the repository at this point in the history
  • Loading branch information
jhbertra committed Sep 30, 2022
1 parent 97f3850 commit 6a3f8df
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions marlowe-runtime/marlowe-runtime.cabal
Expand Up @@ -213,6 +213,7 @@ executable marlowe-tx
, ansi-terminal
, async
, base16
, cardano-api
, containers
, marlowe
, marlowe-protocols
Expand Down
5 changes: 5 additions & 0 deletions marlowe-runtime/marlowe-tx/Main.hs
Expand Up @@ -3,8 +3,10 @@
module Main
where

import Cardano.Api (NetworkId(Mainnet))
import Control.Concurrent.STM (atomically)
import Control.Exception (bracket, bracketOnError, throwIO)
import Control.Monad (when)
import Data.Either (fromRight)
import Data.Void (Void)
import Language.Marlowe.Protocol.Sync.Client (MarloweSyncClient, marloweSyncClientPeer)
Expand Down Expand Up @@ -69,6 +71,7 @@ import Options.Applicative
, strOption
, value
)
import System.Exit (die)

main :: IO ()
main = run =<< getOptions
Expand Down Expand Up @@ -119,6 +122,8 @@ run Options{..} = withSocketsDo do
protocolParameters <- queryChainSync GetProtocolParameters
slotConfig <- queryChainSync GetSlotConfig
networkId <- queryChainSync GetNetworkId
when (networkId == Mainnet) do
die "Mainnet support is currently disabled."
let
solveConstraints :: forall era v. SolveConstraints era v
solveConstraints = Constraints.solveConstraints
Expand Down

0 comments on commit 6a3f8df

Please sign in to comment.