private routing

This commit is contained in:
John Smith
2022-11-02 15:36:01 -04:00
parent ec58574a5e
commit 92b22d5af5
18 changed files with 426 additions and 245 deletions

View File

@@ -626,7 +626,7 @@ impl RouteSpecStore {
signatures: &[DHTSignature],
data: &[u8],
last_hop_id: DHTKey,
) -> EyreResult<Option<(DHTKeySecret, SafetySelection)>> {
) -> EyreResult<Option<(DHTKeySecret, SafetySpec)>> {
let inner = &*self.inner.lock();
let rsd = Self::detail(inner, &public_key).ok_or_else(|| eyre!("route does not exist"))?;
@@ -656,12 +656,12 @@ impl RouteSpecStore {
// We got the correct signatures, return a key ans
Ok(Some((
rsd.secret_key,
SafetySelection::Safe(SafetySpec {
SafetySpec {
preferred_route: Some(*public_key),
hop_count: rsd.hops.len(),
stability: rsd.stability,
sequencing: rsd.sequencing,
}),
},
)))
}