Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(networking): remove unused content hash #883

Merged
merged 1 commit into from
Oct 23, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
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