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

Commit

Permalink
fix: fix dst_key in send_or_handle
Browse files Browse the repository at this point in the history
  • Loading branch information
Yoga07 authored and dirvine committed May 13, 2021
1 parent ebe3fd2 commit 6436aee
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 5 deletions.
5 changes: 2 additions & 3 deletions src/routing/core/messaging/handling/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -343,15 +343,14 @@ impl Core {
msg: returned_msg,
} => {
let sender = sender.ok_or(Error::InvalidSrcLocation)?;
Ok(vec![self.handle_src_ahead(
Ok(vec![self.handle_section_knowledge_query(
*last_known_key,
returned_msg.clone(),
sender,
src_name,
msg.src().src_location().to_dst(),
)?])
}

Variant::DkgStart {
dkg_key,
elders_info,
Expand Down Expand Up @@ -413,7 +412,7 @@ impl Core {
}
}

fn handle_src_ahead(
fn handle_section_knowledge_query(
&self,
key: bls::PublicKey,
msg: Box<Message>,
Expand Down
4 changes: 2 additions & 2 deletions src/routing/core/messaging/sending.rs
Original file line number Diff line number Diff line change
Expand Up @@ -304,8 +304,8 @@ impl Core {
}

let dest_info = DestInfo {
dest: XorName::random(),
dest_section_pk: *self.section.chain().last_key(),
dest: XorName::random(), // will be updated when sending
dest_section_pk: *self.section_key_by_name(&others[0].1),
};

if !others.is_empty() {
Expand Down

0 comments on commit 6436aee

Please sign in to comment.