Skip to content

Commit

Permalink
Merge pull request #2923 from CounterpartyXCP/fixes
Browse files Browse the repository at this point in the history
Fix bootstrap testnet
  • Loading branch information
ouziel-slama authored Jan 9, 2025
2 parents 3afde36 + 8f14358 commit 7bcf502
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)

Check warning

Code scanning / pylint

Module 'pyzstd' has no 'decompress_stream' member. Warning

Module 'pyzstd' has no 'decompress_stream' member.
Expand Down

0 comments on commit 7bcf502

Please sign in to comment.