Skip to content

Commit

Permalink
Fix bootstrap testnet
Browse files Browse the repository at this point in the history
  • Loading branch information
Ouziel committed Jan 9, 2025
1 parent 3afde36 commit 8f14358
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions counterparty-core/counterpartycore/lib/bootstrap.py
Original file line number Diff line number Diff line change
Expand Up @@ -31,11 +31,14 @@ def decompress_zst(zst_filepath):
version = (
os.path.basename(zst_filepath)
.replace("counterparty.db.", "")
.replace("counterparty.testnet.db.", "")
.replace("state.db.", "")
.replace("state.testnet.db.", "")
.replace(".zst", "")
)
filename = zst_filepath.replace(f".{version}.zst", "")
filepath = os.path.join(os.path.dirname(zst_filepath), filename)
print(f"Decompressing {zst_filepath} to {filepath}...")
with io.open(filepath, "wb") as output_file:
with open(zst_filepath, "rb") as input_file:
pyzstd.decompress_stream(input_file, output_file, read_size=16 * 1024)
Expand Down

0 comments on commit 8f14358

Please sign in to comment.