Skip to content

Commit

Permalink
remove .bin from sidechain_storage folder (#499)
Browse files Browse the repository at this point in the history
* Fix issue #392

* Renamed missed references

Co-authored-by: echevrier <[email protected]>
  • Loading branch information
echevrier and echevrier authored Nov 9, 2021
1 parent e58c934 commit 11e25fc
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ bin/attestation_report.json
bin/shards
bin/*.der
bin/enclave-shielding-pubkey.json
bin/sidechain_db.bin
bin/sidechain_db

# client
cli/my_keystore
Expand Down
2 changes: 1 addition & 1 deletion core-primitives/settings/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@ pub mod files {
pub static SHIELDING_KEY_FILE: &str = "enclave-shielding-pubkey.json";
pub static SIGNING_KEY_FILE: &str = "enclave-signing-pubkey.bin";
/// sidechain database path
pub static SIDECHAIN_STORAGE_PATH: &str = "sidechain_db.bin";
pub static SIDECHAIN_STORAGE_PATH: &str = "sidechain_db";
pub static SIDECHAIN_PURGE_INTERVAL: u64 = 7200; // purge sidechain every .. s
pub static SIDECHAIN_PURGE_LIMIT: u64 = 100; // keep the last.. sidechainblocks when purging

Expand Down
6 changes: 3 additions & 3 deletions local-setup/py/worker.py
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ def check_shard_and_prompt_delete(self, shard=None):
return False

def purge(self):
""" Deletes the light_client_db.bin, the shards and the sidechain_db.bin
""" Deletes the light_client_db.bin, the shards and the sidechain_db
"""
self.purge_last_slot_seal()
self.purge_light_client_db()
Expand All @@ -113,9 +113,9 @@ def purge_shards_and_sidechain_db(self):
print(f'Purging shards')
shutil.rmtree(pathlib.Path(f'{self.cwd}/shards'))

if pathlib.Path(f'{self.cwd}/sidechain_db.bin').exists():
if pathlib.Path(f'{self.cwd}/sidechain_db').exists():
print(f'purging sidechain_db')
shutil.rmtree(pathlib.Path(f'{self.cwd}/sidechain_db.bin'))
shutil.rmtree(pathlib.Path(f'{self.cwd}/sidechain_db'))

def purge_light_client_db(self):
print(f'purging light_client_db')
Expand Down

0 comments on commit 11e25fc

Please sign in to comment.