Skip to content

Commit a2b4540

Browse files
This PR cleans up all build_cmd
1 parent faf3d83 commit a2b4540

File tree

5 files changed

+10
-30
lines changed

5 files changed

+10
-30
lines changed

cardano_node_tests/tests/common.py

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -129,16 +129,6 @@
129129
),
130130
)
131131

132-
# Deprecated. Use `PARAM_BUILD_METHOD` instead.
133-
PARAM_USE_BUILD_CMD = pytest.mark.parametrize(
134-
"use_build_cmd",
135-
(
136-
False,
137-
pytest.param(True, marks=SKIPIF_BUILD_UNUSABLE),
138-
),
139-
ids=(clusterlib_utils.BuildMethods.BUILD_RAW, clusterlib_utils.BuildMethods.BUILD),
140-
)
141-
142132
PARAM_PLUTUS_VERSION = pytest.mark.parametrize(
143133
"plutus_version",
144134
(

cardano_node_tests/tests/tests_conway/conway_common.py

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -117,7 +117,6 @@ def submit_vote(
117117
keys: list[clusterlib.FileType],
118118
script_votes: clusterlib.OptionalScriptVotes = (),
119119
submit_method: str = "",
120-
use_build_cmd: bool = True,
121120
build_method: str = clusterlib_utils.BuildMethods.BUILD,
122121
witness_count_add: int = 0,
123122
) -> clusterlib.TxRawOutput:
@@ -135,7 +134,6 @@ def submit_vote(
135134
name_template=f"{name_template}_vote",
136135
src_address=payment_addr.address,
137136
submit_method=submit_method,
138-
use_build_cmd=use_build_cmd,
139137
build_method=build_method,
140138
tx_files=tx_files,
141139
script_votes=script_votes,
@@ -164,7 +162,6 @@ def cast_vote(
164162
cc_skip_votes: bool = False,
165163
drep_skip_votes: bool = False,
166164
spo_skip_votes: bool = False,
167-
use_build_cmd: bool = True,
168165
build_method: str | None = None,
169166
witness_count_add: int = 0,
170167
) -> governance_utils.VotedVotes:
@@ -177,10 +174,7 @@ def cast_vote(
177174
anchor_data = governance_utils.get_default_anchor_data()
178175

179176
if build_method is None:
180-
if use_build_cmd:
181-
build_method = clusterlib_utils.BuildMethods.BUILD
182-
else:
183-
build_method = clusterlib_utils.BuildMethods.BUILD_RAW
177+
build_method = clusterlib_utils.BuildMethods.BUILD_RAW
184178

185179
if approve_cc is not None:
186180
_votes_cc = [
@@ -341,7 +335,7 @@ def resign_ccs(
341335
cluster_obj=cluster_obj,
342336
name_template=f"{name_template}_res",
343337
src_address=payment_addr.address,
344-
use_build_cmd=True,
338+
build_method=clusterlib_utils.BuildMethods.BUILD,
345339
tx_files=tx_files,
346340
)
347341

@@ -403,7 +397,7 @@ def propose_change_constitution(
403397
cluster_obj=cluster_obj,
404398
name_template=f"{name_template}_constitution_action",
405399
src_address=pool_user.payment.address,
406-
use_build_cmd=True,
400+
build_method=clusterlib_utils.BuildMethods.BUILD,
407401
tx_files=tx_files,
408402
fee_buffer=2_000_000,
409403
)
@@ -478,7 +472,7 @@ def propose_pparams_update(
478472
cluster_obj=cluster_obj,
479473
name_template=f"{name_template}_action",
480474
src_address=pool_user.payment.address,
481-
use_build_cmd=True,
475+
build_method=clusterlib_utils.BuildMethods.BUILD,
482476
tx_files=tx_files_action,
483477
)
484478

cardano_node_tests/utils/clusterlib_utils.py

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,6 @@ def build_and_submit_tx(
7272
src_address: str,
7373
submit_method: str = "",
7474
build_method: str = "",
75-
use_build_cmd: bool = False, # Deprecated
7675
txins: clusterlib.OptionalUTXOData = (),
7776
txouts: clusterlib.OptionalTxOuts = (),
7877
readonly_reference_txins: clusterlib.OptionalUTXOData = (),
@@ -116,14 +115,11 @@ def build_and_submit_tx(
116115
* build_raw
117116
* build_estimate
118117
119-
Use `use_build_cmd` to switch between `transaction build` and `transaction build-raw`
120-
(deprecated).
121118
"""
122119
tx_files = tx_files or clusterlib.TxFiles()
123120
submit_method = submit_method or submit_utils.SubmitMethods.CLI
124121

125-
if not build_method:
126-
build_method = BuildMethods.BUILD if use_build_cmd else BuildMethods.BUILD_RAW
122+
build_method = build_method or BuildMethods.BUILD
127123

128124
if build_method == BuildMethods.BUILD_RAW:
129125
# Resolve withdrawal amounts here (where -1 for total rewards amount is used) so the

cardano_node_tests/utils/governance_setup.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ def _cast_vote(
7575
cluster_obj=cluster_obj,
7676
name_template=f"{name_template}_vote",
7777
src_address=payment_addr.address,
78-
use_build_cmd=True,
78+
build_method=clusterlib_utils.BuildMethods.BUILD,
7979
tx_files=tx_files,
8080
)
8181

@@ -429,7 +429,7 @@ def auth_cc_members(
429429
cluster_obj=cluster_obj,
430430
name_template=f"{name_template}_cc_auth",
431431
src_address=payment_addr.address,
432-
use_build_cmd=True,
432+
build_method=clusterlib_utils.BuildMethods.BUILD,
433433
tx_files=tx_files,
434434
)
435435

@@ -498,7 +498,7 @@ def reinstate_committee( # noqa: C901
498498
cluster_obj=cluster_obj,
499499
name_template=f"{name_template}_action",
500500
src_address=pool_user.payment.address,
501-
use_build_cmd=True,
501+
build_method=clusterlib_utils.BuildMethods.BUILD,
502502
tx_files=tx_files_action,
503503
)
504504

cardano_node_tests/utils/governance_utils.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -729,7 +729,7 @@ def create_dreps(
729729
cluster_obj=cluster_obj,
730730
name_template=f"{name_template}_reg",
731731
src_address=payment_addr.address,
732-
use_build_cmd=True,
732+
build_method=clusterlib_utils.BuildMethods.BUILD,
733733
tx_files=tx_files,
734734
deposit=(drep_reg_records[0].deposit + stake_deposit) * len(drep_reg_records),
735735
destination_dir=destination_dir,
@@ -828,7 +828,7 @@ def create_script_dreps(
828828
cluster_obj=cluster_obj,
829829
name_template=f"{name_template}_reg",
830830
src_address=payment_addr.address,
831-
use_build_cmd=True,
831+
build_method=clusterlib_utils.BuildMethods.BUILD,
832832
tx_files=tx_files,
833833
complex_certs=[
834834
*[c.registration_cert for c in drep_script_data],

0 commit comments

Comments
 (0)