Skip to content

Commit

Permalink
chore(networking): remove unused content hash
Browse files Browse the repository at this point in the history
This could take a long time for larger records
  • Loading branch information
joshuef committed Oct 23, 2023
1 parent 636e910 commit 95e0ff7
Showing 1 changed file with 1 addition and 3 deletions.
4 changes: 1 addition & 3 deletions sn_networking/src/record_store.rs
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,6 @@ use std::{
vec,
};
use tokio::sync::mpsc;
use xor_name::XorName;

/// Max number of records a node can store
const MAX_RECORDS_COUNT: usize = 2048;
Expand Down Expand Up @@ -208,9 +207,8 @@ impl NodeRecordStore {
/// Warning: PUTs a `Record` to the store without validation
/// Should be used in context where the `Record` is trusted
pub(crate) fn put_verified(&mut self, r: Record) -> Result<()> {
let content_hash = XorName::from_content(&r.value);
let record_key = PrettyPrintRecordKey::from(r.key.clone());
trace!("PUT a verified Record: {record_key:?} (content_hash {content_hash:?})");
trace!("PUT a verified Record: {record_key:?}");

self.prune_storage_if_needed_for_record(&r.key)?;

Expand Down

0 comments on commit 95e0ff7

Please sign in to comment.