File tree 1 file changed +19
-0
lines changed
1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -307,6 +307,25 @@ if [ "$RESULT" != "$AGG_KEY_HEIGHT" ]; then
307
307
exit 1
308
308
fi
309
309
310
+ FIRST_ENCRYPTED_TX_HEIGHT=$( $BINARY query pep list-encrypted-tx --node $CHAIN2_NODE -o json | jq ' .encryptedTxArray[0].encryptedTx[0].processedAtChainHeight' )
311
+ SECOND_ENCRYPTED_TX_HEIGHT=$( $BINARY query pep list-encrypted-tx --node $CHAIN2_NODE -o json | jq ' .encryptedTxArray[0].encryptedTx[1].processedAtChainHeight' )
312
+
313
+ echo " First Encrypted tx processed at height: $FIRST_ENCRYPTED_TX_HEIGHT , 2nd one processed at: $SECOND_ENCRYPTED_TX_HEIGHT "
314
+
315
+ FIRST_EVENT=$( curl -s http://localhost:26657/block_results? height=$FIRST_ENCRYPTED_TX_HEIGHT | jq ' .result.begin_block_events[] | select(.type == "reverted-encrypted-tx") | .attributes[] | select(.key == "reason") | .value' )
316
+ if [[ " $FIRST_EVENT " != * " insufficient fees" * ]]; then
317
+ echo " ERROR: Pep module expected first encrypted tx failed with reason insufficient fee, got: $FIRST_EVENT instead"
318
+ exit 1
319
+ fi
320
+ echo " First Encrypted TX Failed with Reason: $FIRST_EVENT as expected."
321
+
322
+ SECOND_EVENT=$( curl -s http://localhost:26657/block_results? height=$SECOND_ENCRYPTED_TX_HEIGHT | jq ' .result.begin_block_events[] | select(.type == "executed-encrypted-tx") | .attributes[] | select(.key == "events") | .value' )
323
+ if [[ " $SECOND_EVENT " != * " coin_received" * ]]; then
324
+ echo " ERROR: Pep module expected second encrypted tx succeeded with events, got: $SECOND_EVENT instead"
325
+ exit 1
326
+ fi
327
+ echo " Second Encrypted TX succeeded with Events: $( echo $SECOND_EVENT | jq) as expected."
328
+
310
329
echo " "
311
330
echo " ###########################################################"
312
331
echo " # SUCCESSFULLY TESTED #"
You can’t perform that action at this time.
0 commit comments