Skip to content
This repository has been archived by the owner on Jun 25, 2021. It is now read-only.

Commit

Permalink
fix: convert SrcLocation to DstLocation in AE messages
Browse files Browse the repository at this point in the history
  • Loading branch information
Yoga07 authored and dirvine committed May 13, 2021
1 parent b28c422 commit 314dc3e
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/routing/lazy_messaging.rs
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,8 @@ pub(crate) fn process(
return Ok((actions, true));
}

let dst = msg.src().src_location().to_dst();

if let Ok(src_chain) = msg.proof_chain() {
if let Some(key) = network.key_by_name(&src_name) {
match src_chain.cmp_by_position(src_chain.last_key(), key) {
Expand All @@ -52,7 +54,7 @@ pub(crate) fn process(
key: *key,
msg: Box::new(msg.clone()),
},
DstLocation::Node(src_name),
dst,
)?;
actions.send.push(msg);
}
Expand Down Expand Up @@ -105,7 +107,7 @@ pub(crate) fn process(
section,
network,
variant,
DstLocation::Node(src_name),
dst,
)?;
actions.send.push(msg);
return Ok((actions, true));
Expand Down

0 comments on commit 314dc3e

Please sign in to comment.