Skip to content
Permalink

Comparing changes

This is a direct comparison between two commits made in this repository or its related repositories. View the default comparison for this range or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: tari-project/tari
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 64f960ce8ca19507a4c88c4665d832fe1826a77c
Choose a base ref
..
head repository: tari-project/tari
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 7b2a085a17be6b929bc41eee1313c9a8208c634a
Choose a head ref
Showing with 2 additions and 1 deletion.
  1. +0 −1 base_layer/core/src/common/mod.rs
  2. +2 −0 base_layer/core/src/common/waiting_requests.rs
1 change: 0 additions & 1 deletion base_layer/core/src/common/mod.rs
Original file line number Diff line number Diff line change
@@ -36,7 +36,6 @@ pub mod one_sided;
pub mod rolling_avg;
#[cfg(feature = "base_node")]
pub mod rolling_vec;
#[cfg(feature = "base_node")]
pub(crate) mod waiting_requests;

/// Hasher used in the DAN to derive masks and encrypted value keys
2 changes: 2 additions & 0 deletions base_layer/core/src/common/waiting_requests.rs
Original file line number Diff line number Diff line change
@@ -50,6 +50,7 @@ impl<T> WaitingRequests<T> {
}

/// Insert a new waiting request.
#[cfg(feature = "base_node")]
pub async fn insert(&self, key: RequestKey, reply_tx: OneshotSender<T>) {
self.requests
.write()
@@ -58,6 +59,7 @@ impl<T> WaitingRequests<T> {
}

/// Remove the waiting request corresponding to the provided key.
#[cfg(feature = "base_node")]
pub async fn remove(&self, key: RequestKey) -> Option<(OneshotSender<T>, Instant)> {
self.requests.write().await.remove(&key).unwrap_or(None)
}