Skip to content

Commit a25beff

Browse files
committed
fix(devnet): computation of transaction hash breaking change in Cardano CLI
1 parent 0346c8e commit a25beff

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

mithril-test-lab/mithril-devnet/mkfiles/mkfiles-mithril-era.sh

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,7 +97,10 @@ function send_funds_to_era_address {
9797
9898
## Compute the submitted transaction id
9999
TX_ID_SUBMITTED=\$(CARDANO_NODE_SOCKET_PATH=node-pool${N}/ipc/node.sock $CARDANO_CLI \${CURRENT_CARDANO_ERA} transaction txid --tx-file node-pool${N}/tx/tx${N}-era-funds.tx)
100-
100+
if [[ "\${TX_ID_SUBMITTED}" =~ txhash ]]; then
101+
TX_ID_SUBMITTED=\$(echo \$TX_ID_SUBMITTED | jq -r '.txhash')
102+
fi
103+
101104
## Wait at least for 10 blocks so that the transaction is confirmed
102105
wait_for_elapsed_blocks 10
103106

mithril-test-lab/mithril-devnet/mkfiles/mkfiles-mithril-payment.sh

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -121,6 +121,9 @@ cat >> payment-mithril.sh <<EOF
121121
122122
## Compute the submitted transaction id
123123
TX_ID_SUBMITTED=\$($CARDANO_CLI \${CURRENT_CARDANO_ERA} transaction txid --tx-file node-pool${i}/tx/tx${i}-payment-funds.tx)
124+
if [[ "\${TX_ID_SUBMITTED}" =~ txhash ]]; then
125+
TX_ID_SUBMITTED=\$(echo \$TX_ID_SUBMITTED | jq -r '.txhash')
126+
fi
124127
125128
## Retrieve the on-chain transaction id
126129
TX_IN_ON_CHAIN=\$(CARDANO_NODE_SOCKET_PATH=node-pool${N}/ipc/node.sock $CARDANO_CLI \${CURRENT_CARDANO_ERA} query utxo \\

0 commit comments

Comments
 (0)