Skip to content
Merged
Show file tree
Hide file tree
Changes from 3 commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
10 changes: 0 additions & 10 deletions cardano_node_tests/tests/common.py
Original file line number Diff line number Diff line change
Expand Up @@ -129,16 +129,6 @@
),
)

# Deprecated. Use `PARAM_BUILD_METHOD` instead.
PARAM_USE_BUILD_CMD = pytest.mark.parametrize(
"use_build_cmd",
(
False,
pytest.param(True, marks=SKIPIF_BUILD_UNUSABLE),
),
ids=(clusterlib_utils.BuildMethods.BUILD_RAW, clusterlib_utils.BuildMethods.BUILD),
)

PARAM_PLUTUS_VERSION = pytest.mark.parametrize(
"plutus_version",
(
Expand Down
14 changes: 4 additions & 10 deletions cardano_node_tests/tests/tests_conway/conway_common.py
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,6 @@ def submit_vote(
keys: list[clusterlib.FileType],
script_votes: clusterlib.OptionalScriptVotes = (),
submit_method: str = "",
use_build_cmd: bool = True,
build_method: str = clusterlib_utils.BuildMethods.BUILD,
witness_count_add: int = 0,
) -> clusterlib.TxRawOutput:
Expand All @@ -135,7 +134,6 @@ def submit_vote(
name_template=f"{name_template}_vote",
src_address=payment_addr.address,
submit_method=submit_method,
use_build_cmd=use_build_cmd,
build_method=build_method,
tx_files=tx_files,
script_votes=script_votes,
Expand Down Expand Up @@ -164,7 +162,6 @@ def cast_vote(
cc_skip_votes: bool = False,
drep_skip_votes: bool = False,
spo_skip_votes: bool = False,
use_build_cmd: bool = True,
build_method: str | None = None,
witness_count_add: int = 0,
) -> governance_utils.VotedVotes:
Expand All @@ -177,10 +174,7 @@ def cast_vote(
anchor_data = governance_utils.get_default_anchor_data()

if build_method is None:
if use_build_cmd:
build_method = clusterlib_utils.BuildMethods.BUILD
else:
build_method = clusterlib_utils.BuildMethods.BUILD_RAW
build_method = clusterlib_utils.BuildMethods.BUILD_RAW

if approve_cc is not None:
_votes_cc = [
Expand Down Expand Up @@ -341,7 +335,7 @@ def resign_ccs(
cluster_obj=cluster_obj,
name_template=f"{name_template}_res",
src_address=payment_addr.address,
use_build_cmd=True,
build_method=clusterlib_utils.BuildMethods.BUILD,
tx_files=tx_files,
)

Expand Down Expand Up @@ -403,7 +397,7 @@ def propose_change_constitution(
cluster_obj=cluster_obj,
name_template=f"{name_template}_constitution_action",
src_address=pool_user.payment.address,
use_build_cmd=True,
build_method=clusterlib_utils.BuildMethods.BUILD,
tx_files=tx_files,
fee_buffer=2_000_000,
)
Expand Down Expand Up @@ -478,7 +472,7 @@ def propose_pparams_update(
cluster_obj=cluster_obj,
name_template=f"{name_template}_action",
src_address=pool_user.payment.address,
use_build_cmd=True,
build_method=clusterlib_utils.BuildMethods.BUILD,
tx_files=tx_files_action,
)

Expand Down
6 changes: 1 addition & 5 deletions cardano_node_tests/utils/clusterlib_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,6 @@ def build_and_submit_tx(
src_address: str,
submit_method: str = "",
build_method: str = "",
use_build_cmd: bool = False, # Deprecated
txins: clusterlib.OptionalUTXOData = (),
txouts: clusterlib.OptionalTxOuts = (),
readonly_reference_txins: clusterlib.OptionalUTXOData = (),
Expand Down Expand Up @@ -116,14 +115,11 @@ def build_and_submit_tx(
* build_raw
* build_estimate

Use `use_build_cmd` to switch between `transaction build` and `transaction build-raw`
(deprecated).
"""
tx_files = tx_files or clusterlib.TxFiles()
submit_method = submit_method or submit_utils.SubmitMethods.CLI

if not build_method:
build_method = BuildMethods.BUILD if use_build_cmd else BuildMethods.BUILD_RAW
build_method = build_method or BuildMethods.BUILD

if build_method == BuildMethods.BUILD_RAW:
# Resolve withdrawal amounts here (where -1 for total rewards amount is used) so the
Expand Down
6 changes: 3 additions & 3 deletions cardano_node_tests/utils/governance_setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ def _cast_vote(
cluster_obj=cluster_obj,
name_template=f"{name_template}_vote",
src_address=payment_addr.address,
use_build_cmd=True,
build_method=clusterlib_utils.BuildMethods.BUILD,
tx_files=tx_files,
)

Expand Down Expand Up @@ -429,7 +429,7 @@ def auth_cc_members(
cluster_obj=cluster_obj,
name_template=f"{name_template}_cc_auth",
src_address=payment_addr.address,
use_build_cmd=True,
build_method=clusterlib_utils.BuildMethods.BUILD,
tx_files=tx_files,
)

Expand Down Expand Up @@ -498,7 +498,7 @@ def reinstate_committee( # noqa: C901
cluster_obj=cluster_obj,
name_template=f"{name_template}_action",
src_address=pool_user.payment.address,
use_build_cmd=True,
build_method=clusterlib_utils.BuildMethods.BUILD,
tx_files=tx_files_action,
)

Expand Down
4 changes: 2 additions & 2 deletions cardano_node_tests/utils/governance_utils.py
Original file line number Diff line number Diff line change
Expand Up @@ -729,7 +729,7 @@ def create_dreps(
cluster_obj=cluster_obj,
name_template=f"{name_template}_reg",
src_address=payment_addr.address,
use_build_cmd=True,
build_method=clusterlib_utils.BuildMethods.BUILD,
tx_files=tx_files,
deposit=(drep_reg_records[0].deposit + stake_deposit) * len(drep_reg_records),
destination_dir=destination_dir,
Expand Down Expand Up @@ -828,7 +828,7 @@ def create_script_dreps(
cluster_obj=cluster_obj,
name_template=f"{name_template}_reg",
src_address=payment_addr.address,
use_build_cmd=True,
build_method=clusterlib_utils.BuildMethods.BUILD,
tx_files=tx_files,
complex_certs=[
*[c.registration_cert for c in drep_script_data],
Expand Down
Loading