Skip to content

Commit

Permalink
Query over single connection in runTxBuildCmd
Browse files Browse the repository at this point in the history
  • Loading branch information
newhoggy committed Jul 14, 2023
1 parent d803dd5 commit b0ab115
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cardano-cli/src/Cardano/CLI/Shelley/Run/Transaction.hs
Original file line number Diff line number Diff line change
Expand Up @@ -351,10 +351,6 @@ runTxBuildCmd
, localNodeSocketPath = socketPath
}

AnyCardanoEra nodeEra <- lift (executeLocalStateQueryExpr localNodeConnInfo Nothing (determineEraExpr cModeParams))
& onLeft (left . ShelleyTxCmdQueryConvenienceError . AcqFailure)
& onLeft (left . ShelleyTxCmdQueryConvenienceError . QceUnsupportedNtcVersion)

inputsAndMaybeScriptWits <- firstExceptT ShelleyTxCmdScriptWitnessError $ readScriptWitnessFiles cEra txins
certFilesAndMaybeScriptWits <- firstExceptT ShelleyTxCmdScriptWitnessError $ readScriptWitnessFiles cEra certs

Expand Down Expand Up @@ -430,6 +426,10 @@ runTxBuildCmd

case consensusMode of
CardanoMode -> do
AnyCardanoEra nodeEra <- lift (executeLocalStateQueryExpr localNodeConnInfo Nothing (determineEraExpr cModeParams))
& onLeft (left . ShelleyTxCmdQueryConvenienceError . AcqFailure)
& onLeft (left . ShelleyTxCmdQueryConvenienceError . QceUnsupportedNtcVersion)

(nodeEraUTxO, _, eraHistory, systemStart, _, _) <-
lift (executeLocalStateQueryExpr localNodeConnInfo Nothing (queryStateForBalancedTx nodeEra allTxInputs []))
& onLeft (left . ShelleyTxCmdQueryConvenienceError . AcqFailure)
Expand Down

0 comments on commit b0ab115

Please sign in to comment.