Skip to content

Commit 57cea6e

Browse files
authored
Merge pull request #3162 from IntersectMBO/clean-up-build-cmd
This PR cleans up all build_cmd
2 parents 034d740 + 20f5908 commit 57cea6e

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
@@ -78,7 +78,6 @@ def build_and_submit_tx(
7878
src_address: str,
7979
submit_method: str = "",
8080
build_method: str = "",
81-
use_build_cmd: bool = False, # Deprecated
8281
txins: clusterlib.OptionalUTXOData = (),
8382
txouts: clusterlib.OptionalTxOuts = (),
8483
readonly_reference_txins: clusterlib.OptionalUTXOData = (),
@@ -122,14 +121,11 @@ def build_and_submit_tx(
122121
* build_raw
123122
* build_estimate
124123
125-
Use `use_build_cmd` to switch between `transaction build` and `transaction build-raw`
126-
(deprecated).
127124
"""
128125
tx_files = tx_files or clusterlib.TxFiles()
129126
submit_method = submit_method or submit_utils.SubmitMethods.CLI
130127

131-
if not build_method:
132-
build_method = BuildMethods.BUILD if use_build_cmd else BuildMethods.BUILD_RAW
128+
build_method = build_method or BuildMethods.BUILD_RAW
133129

134130
if build_method == BuildMethods.BUILD_RAW:
135131
# 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
@@ -732,7 +732,7 @@ def create_dreps(
732732
cluster_obj=cluster_obj,
733733
name_template=f"{name_template}_reg",
734734
src_address=payment_addr.address,
735-
use_build_cmd=True,
735+
build_method=clusterlib_utils.BuildMethods.BUILD,
736736
tx_files=tx_files,
737737
deposit=(drep_reg_records[0].deposit + stake_deposit) * len(drep_reg_records),
738738
destination_dir=destination_dir,
@@ -831,7 +831,7 @@ def create_script_dreps(
831831
cluster_obj=cluster_obj,
832832
name_template=f"{name_template}_reg",
833833
src_address=payment_addr.address,
834-
use_build_cmd=True,
834+
build_method=clusterlib_utils.BuildMethods.BUILD,
835835
tx_files=tx_files,
836836
complex_certs=[
837837
*[c.registration_cert for c in drep_script_data],

0 commit comments

Comments
 (0)