@@ -1751,17 +1751,21 @@ def _check_rat_enact_state(
17511751 ],
17521752 )
17531753
1754- tx_output_action = clusterlib_utils .build_and_submit_tx (
1754+ tx_output = clusterlib_utils .build_and_submit_tx (
17551755 cluster_obj = cluster ,
17561756 name_template = f"{ temp_template } _update_threshold" ,
17571757 src_address = pool_user_lg .payment .address ,
17581758 use_build_cmd = True ,
17591759 tx_files = tx_files ,
17601760 )
17611761
1762- threshold_action_txid = cluster .g_transaction .get_txid (
1763- tx_body_file = tx_output_action .out_file
1764- )
1762+ out_utxos = cluster .g_query .get_utxo (tx_raw_output = tx_output )
1763+ assert (
1764+ clusterlib .filter_utxos (utxos = out_utxos , address = pool_user_lg .payment .address )[0 ].amount
1765+ == clusterlib .calculate_utxos_balance (tx_output .txins ) - tx_output .fee - deposit_amt
1766+ ), f"Incorrect balance for source address `{ pool_user_lg .payment .address } `"
1767+
1768+ threshold_action_txid = cluster .g_transaction .get_txid (tx_body_file = tx_output .out_file )
17651769 threshold_action_gov_state = cluster .g_conway_governance .query .gov_state ()
17661770 threshold_action_epoch = cluster .g_query .get_epoch ()
17671771 conway_common .save_gov_state (
@@ -1771,6 +1775,7 @@ def _check_rat_enact_state(
17711775 prop_action = governance_utils .lookup_proposal (
17721776 gov_state = threshold_action_gov_state , action_txid = threshold_action_txid
17731777 )
1778+ assert prop_action , "Update committee action not found"
17741779 action_ix = prop_action ["actionId" ]["govActionIx" ]
17751780
17761781 # Make sure the votes don't happen close to epoch boundary
0 commit comments