This commit is contained in:
John Smith
2023-03-11 15:23:50 +00:00
parent 0d614c61a2
commit e52b5f60cd
5 changed files with 39 additions and 26 deletions

View File

@@ -156,17 +156,18 @@ impl RPCProcessor {
// Look up the private route and ensure it's one in our spec store
// Ensure the route is validated, and construct a return safetyspec that matches the inbound preferences
let rss = self.routing_table.route_spec_store();
let preferred_route = rss.get_route_id_for_key(&pr_pubkey.value);
let Some((secret_key, safety_spec)) = rss
.with_signature_validated_route(
&pr_pubkey,
&routed_operation.signatures,
&routed_operation.data,
sender_id,
|rssd, rsd| {
|rssd, rsd| {
(
rsd.secret_key,
SafetySpec {
preferred_route: rss.get_route_id_for_key(&pr_pubkey.value),
preferred_route,
hop_count: rssd.hop_count(),
stability: rssd.get_stability(),
sequencing: routed_operation.sequencing,