Skip to content

Commit

Permalink
Revert "Merge pull request #2243 from maqi/record_store_dir_prefixed_…
Browse files Browse the repository at this point in the history
…with_network_keys"

This reverts commit 147ba8e, reversing
changes made to 00ad51d.
  • Loading branch information
jacderida committed Oct 21, 2024
1 parent 09c36c8 commit 27362f3
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
7 changes: 3 additions & 4 deletions sn_networking/src/driver.rs
Original file line number Diff line number Diff line change
Expand Up @@ -52,8 +52,8 @@ use sn_protocol::{
messages::{ChunkProof, Nonce, Request, Response},
storage::{try_deserialize_record, RetryStrategy},
version::{
get_key_version_str, IDENTIFY_CLIENT_VERSION_STR, IDENTIFY_NODE_VERSION_STR,
IDENTIFY_PROTOCOL_STR, REQ_RESPONSE_VERSION_STR,
IDENTIFY_CLIENT_VERSION_STR, IDENTIFY_NODE_VERSION_STR, IDENTIFY_PROTOCOL_STR,
REQ_RESPONSE_VERSION_STR,
},
NetworkAddress, PrettyPrintKBucketKey, PrettyPrintRecordKey,
};
Expand Down Expand Up @@ -364,8 +364,7 @@ impl NetworkBuilder {

let store_cfg = {
// Configures the disk_store to store records under the provided path and increase the max record size
// The storage dir is appendixed with key_version str to avoid bringing records from old network into new
let storage_dir_path = root_dir.join(format!("record_store_{}", get_key_version_str()));
let storage_dir_path = root_dir.join("record_store");
if let Err(error) = std::fs::create_dir_all(&storage_dir_path) {
return Err(NetworkError::FailedToCreateRecordStoreDir {
path: storage_dir_path,
Expand Down
2 changes: 1 addition & 1 deletion sn_protocol/src/version.rs
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ fn get_truncate_version_str() -> String {
/// Get the PKs version string.
/// If the public key mis-configed via env variable,
/// it shall result in being rejected to join by the network
pub fn get_key_version_str() -> String {
fn get_key_version_str() -> String {
let mut f_k_str = FOUNDATION_PK.to_hex();
let _ = f_k_str.split_off(6);
let mut g_k_str = GENESIS_PK.to_hex();
Expand Down

0 comments on commit 27362f3

Please sign in to comment.