Skip to content

Commit

Permalink
Add comments
Browse files Browse the repository at this point in the history
  • Loading branch information
DOBEN committed May 14, 2024
1 parent 088ce7d commit 65ea4b4
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 42 deletions.
10 changes: 7 additions & 3 deletions src/Concordium/Client/Runner.hs
Original file line number Diff line number Diff line change
Expand Up @@ -779,7 +779,7 @@ processTransactionCmd action baseCfgDir verbose backend =
logSuccess [printf "transaction '%s' sent to the node" (show hash)]
when (ioTail intOpts) $ do
tailTransaction_ verbose hash
logSuccess ["credential deployed successfully"]
-- logSuccess ["credential deployed successfully"]
TransactionStatus h schemaFile -> do
hash <- case parseTransactionHash h of
Nothing -> logFatal [printf "invalid transaction hash '%s'" h]
Expand Down Expand Up @@ -1654,6 +1654,7 @@ signAndProcessTransaction_ ::
InteractionOpts ->
-- | An optional file name to output the signed/partially-signed transaction to instead of sending it to the node
Maybe FilePath ->
-- | Node backend connection
Backend ->
ClientMonad m ()
signAndProcessTransaction_ verbose txCfg pl intOpts outFile backend = void $ signAndProcessTransaction verbose txCfg pl intOpts outFile backend
Expand All @@ -1674,14 +1675,15 @@ signAndProcessTransaction ::
InteractionOpts ->
-- | An optional file name to output the signed/partially-signed transaction to instead of sending it to the node
Maybe FilePath ->
-- | Node backend connection
Backend ->
ClientMonad m (Maybe TransactionStatusResult)
signAndProcessTransaction verbose txCfg pl intOpts outFile backend = do
tx <- startTransaction txCfg pl (ioConfirm intOpts) Nothing

case outFile of
Just filePath -> do
logInfo [[i| Write signed transaction to file. Will not send it to the node.|]]
logInfo [[i| Will write signed transaction to file. Will not send transaction to the node.|]]

-- Get protocol version
pv <- liftIO $ withClient backend $ do
Expand Down Expand Up @@ -1711,7 +1713,7 @@ signAndProcessTransaction verbose txCfg pl intOpts outFile backend = do
liftIO $ writeSignedTransactionToFile signedTransaction filePath verbose PromptBeforeOverwrite
return Nothing
Nothing -> do
logInfo [[i| Send signed transaction to node.|]]
logInfo [[i| Will send signed transaction to node.|]]

-- Send transaction on chain
let bareBlockItem = Types.NormalTransaction tx
Expand Down Expand Up @@ -3652,6 +3654,8 @@ processBakerRemoveCmd baseCfgDir verbose backend txOpts = do
let payload = Types.encodePayload Types.RemoveBaker
nrgCost _ = return . Just $ bakerRemoveEnergyCost $ Types.payloadSize payload
txCfg@TransactionConfig{..} <- getTransactionCfg baseCfg txOpts nrgCost
logInfo ["payloadpayloadpayloadpayloadpayloadpayload: "]
logInfo [[i| #{showPrettyJSON payload}.|]]
logSuccess
( [ printf "submitting transaction to remove validator with %s" (show (naAddr $ esdAddress tcEncryptedSigningData)),
printf "allowing up to %s to be spent as transaction fee" (showNrg tcEnergy)
Expand Down
23 changes: 0 additions & 23 deletions transaction.json

This file was deleted.

15 changes: 0 additions & 15 deletions updateOperator.json

This file was deleted.

0 comments on commit 65ea4b4

Please sign in to comment.