Skip to content

Commit 3f3b134

Browse files
committed
refactor filename
1 parent 6aef294 commit 3f3b134

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

chia/plotting/prover.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ def disk_prover(self) -> DiskProver:
159159

160160

161161
def get_prover_from_bytes(filename: str, prover_data: bytes) -> ProverProtocol:
162-
if filename.endswith(".plot_v2"):
162+
if filename.endswith(".plot2"):
163163
return V2Prover.from_bytes(prover_data)
164164
elif filename.endswith(".plot"):
165165
return V1Prover(DiskProver.from_bytes(prover_data))
@@ -168,7 +168,7 @@ def get_prover_from_bytes(filename: str, prover_data: bytes) -> ProverProtocol:
168168

169169

170170
def get_prover_from_file(filename: str) -> ProverProtocol:
171-
if filename.endswith(".plot_v2"):
171+
if filename.endswith(".plot2"):
172172
return V2Prover(filename)
173173
elif filename.endswith(".plot"):
174174
return V1Prover(DiskProver(filename))

chia/plotting/util.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -236,7 +236,7 @@ def get_filenames(directory: Path, recursive: bool, follow_links: bool) -> list[
236236
import glob
237237

238238
v1_file_strs = glob.glob(str(directory / "**" / "*.plot"), recursive=True)
239-
v2_file_strs = glob.glob(str(directory / "**" / "*.plot_v2"), recursive=True)
239+
v2_file_strs = glob.glob(str(directory / "**" / "*.plot2"), recursive=True)
240240

241241
for file in v1_file_strs + v2_file_strs:
242242
filepath = Path(file).resolve()
@@ -248,7 +248,7 @@ def get_filenames(directory: Path, recursive: bool, follow_links: bool) -> list[
248248
child for child in glob_function("*.plot") if child.is_file() and not child.name.startswith("._")
249249
]
250250
v2_files: list[Path] = [
251-
child for child in glob_function("*.plot_v2") if child.is_file() and not child.name.startswith("._")
251+
child for child in glob_function("*.plot2") if child.is_file() and not child.name.startswith("._")
252252
]
253253
all_files = v1_files + v2_files
254254
log.debug(f"get_filenames: {len(all_files)} files found in {directory}, recursive: {recursive}")

0 commit comments

Comments
 (0)