|
7 | 7 | from typing import Any, Callable, Union |
8 | 8 |
|
9 | 9 | import pytest |
10 | | -from chia_rs import G1Element, PlotParam |
| 10 | +from chia_rs import G1Element |
11 | 11 | from chia_rs.sized_bytes import bytes32 |
12 | 12 | from chia_rs.sized_ints import uint8, uint32, uint64 |
13 | 13 |
|
@@ -189,7 +189,7 @@ def plot_sync_setup(seeded_random: random.Random) -> tuple[Receiver, list[SyncSt |
189 | 189 | # TODO: todo_v2_plots support v2 plots |
190 | 190 | receiver._total_effective_plot_size = int( |
191 | 191 | sum( |
192 | | - UI_ACTUAL_SPACE_CONSTANT_FACTOR * int(_expected_plot_size(PlotParam.make_v1(plot.size), DEFAULT_CONSTANTS)) |
| 192 | + UI_ACTUAL_SPACE_CONSTANT_FACTOR * int(_expected_plot_size(plot.param(), DEFAULT_CONSTANTS)) |
193 | 193 | for plot in receiver.plots().values() |
194 | 194 | ) |
195 | 195 | ) |
@@ -272,9 +272,8 @@ async def test_to_dict(counts_only: bool, seeded_random: random.Random) -> None: |
272 | 272 | assert get_list_or_len(plot_sync_dict_1["duplicates"], not counts_only) == 0 |
273 | 273 | assert plot_sync_dict_1["total_plot_size"] == sum(plot.file_size for plot in receiver.plots().values()) |
274 | 274 | assert plot_sync_dict_1["total_effective_plot_size"] == int( |
275 | | - # TODO: todo_v2_plots support v2 plots |
276 | 275 | sum( |
277 | | - UI_ACTUAL_SPACE_CONSTANT_FACTOR * int(_expected_plot_size(PlotParam.make_v1(plot.size), DEFAULT_CONSTANTS)) |
| 276 | + UI_ACTUAL_SPACE_CONSTANT_FACTOR * int(_expected_plot_size(plot.param(), DEFAULT_CONSTANTS)) |
278 | 277 | for plot in receiver.plots().values() |
279 | 278 | ) |
280 | 279 | ) |
@@ -322,10 +321,9 @@ async def test_to_dict(counts_only: bool, seeded_random: random.Random) -> None: |
322 | 321 | assert get_list_or_len(sync_steps[State.duplicates].args[0], counts_only) == plot_sync_dict_3["duplicates"] |
323 | 322 |
|
324 | 323 | assert plot_sync_dict_3["total_plot_size"] == sum(plot.file_size for plot in receiver.plots().values()) |
325 | | - # TODO: todo_v2_plots support v2 plots |
326 | 324 | assert plot_sync_dict_3["total_effective_plot_size"] == int( |
327 | 325 | sum( |
328 | | - UI_ACTUAL_SPACE_CONSTANT_FACTOR * int(_expected_plot_size(PlotParam.make_v1(plot.size), DEFAULT_CONSTANTS)) |
| 326 | + UI_ACTUAL_SPACE_CONSTANT_FACTOR * int(_expected_plot_size(plot.param(), DEFAULT_CONSTANTS)) |
329 | 327 | for plot in receiver.plots().values() |
330 | 328 | ) |
331 | 329 | ) |
|
0 commit comments