Skip to content

Commit

Permalink
Fix partial record selector usage
Browse files Browse the repository at this point in the history
  • Loading branch information
jhbertra committed Sep 26, 2023
1 parent f764c1b commit 4686992
Showing 1 changed file with 42 additions and 12 deletions.
54 changes: 42 additions & 12 deletions marlowe-cli/command/Language/Marlowe/CLI/Command/Run.hs
Original file line number Diff line number Diff line change
Expand Up @@ -267,20 +267,20 @@ runRunCommand
runRunCommand command =
do
let network' = network command
connection =
LocalNodeConnectInfo
{ localConsensusModeParams = CardanoModeParams $ EpochSlots 21600
, localNodeNetworkId = network'
, localNodeSocketPath = File $ socketPath command
}
marloweParams' = maybe defaultMarloweParams marloweParams $ rolesCurrency command
stake' = fromMaybe NoStakeAddress $ stake command
printTxId = liftIO . putStrLn . ("TxId " <>) . show
padTxOut (address, value) = (address, C.TxOutDatumNone, value)
outputs' = padTxOut <$> outputs command
costModel <- getPV2CostModelParams (QueryNode connection)
case command of
Initialize{..} -> do
let connection =
LocalNodeConnectInfo
{ localConsensusModeParams = CardanoModeParams $ EpochSlots 21600
, localNodeNetworkId = network'
, localNodeSocketPath = File socketPath
}
costModel <- getPV2CostModelParams (QueryNode connection)
slotConfig <- querySlotConfig connection
protocolVersion <- getProtocolVersion (QueryNode connection)
initializeTransaction
Expand All @@ -305,7 +305,13 @@ runRunCommand command =
maximumTime
outputFile
printStats
Run{..} ->
Run{..} -> do
let connection =
LocalNodeConnectInfo
{ localConsensusModeParams = CardanoModeParams $ EpochSlots 21600
, localNodeNetworkId = network'
, localNodeSocketPath = File socketPath
}
runTransaction
connection
marloweIn
Expand All @@ -320,7 +326,13 @@ runRunCommand command =
printStats
invalid
>>= printTxId
Withdraw{..} ->
Withdraw{..} -> do
let connection =
LocalNodeConnectInfo
{ localConsensusModeParams = CardanoModeParams $ EpochSlots 21600
, localNodeNetworkId = network'
, localNodeSocketPath = File socketPath
}
withdrawFunds
connection
marloweOut
Expand All @@ -336,7 +348,13 @@ runRunCommand command =
printStats
invalid
>>= printTxId
AutoRun{..} ->
AutoRun{..} -> do
let connection =
LocalNodeConnectInfo
{ localConsensusModeParams = CardanoModeParams $ EpochSlots 21600
, localNodeNetworkId = network'
, localNodeSocketPath = File socketPath
}
autoRunTransaction
connection
marloweIn'
Expand All @@ -349,7 +367,13 @@ runRunCommand command =
printStats
invalid
>>= printTxId
AutoWithdraw{..} ->
AutoWithdraw{..} -> do
let connection =
LocalNodeConnectInfo
{ localConsensusModeParams = CardanoModeParams $ EpochSlots 21600
, localNodeNetworkId = network'
, localNodeSocketPath = File socketPath
}
autoWithdrawFunds
connection
marloweOut
Expand All @@ -362,7 +386,13 @@ runRunCommand command =
(PrintStats printStats)
invalid
>>= printTxId
Analyze{..} ->
Analyze{..} -> do
let connection =
LocalNodeConnectInfo
{ localConsensusModeParams = CardanoModeParams $ EpochSlots 21600
, localNodeNetworkId = network'
, localNodeSocketPath = File socketPath
}
analyze
connection
marloweOut
Expand Down

0 comments on commit 4686992

Please sign in to comment.