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 30, 2023
1 parent f622f47 commit e777849
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cardano-cli/src/Cardano/CLI/Run/Legacy/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 @@ -435,6 +431,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 e777849

Please sign in to comment.