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

feat: notify when key got changed during relocation #2235

Merged
merged 1 commit into from
Nov 23, 2020

Conversation

maqi
Copy link
Member

@maqi maqi commented Nov 19, 2020

No description provided.

src/event.rs Outdated
@@ -78,6 +79,8 @@ pub enum Event {
Relocated {
/// Old name before the relocation.
previous_name: XorName,
/// Serialised new keypart. Use Keypair::from_bytes to re-construct.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why is it serialized?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

cloning will be problematic espically out of the crate ?

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pass it as Arc<Keypair> (it's how it's kept in Node anyway). By passing the bytes you are basically bypassing the whole security thing where we are trying to avoid having multiple copies of the key in memory.

@maqi maqi changed the title WIP feat: notify when key got changed during relocation feat: notify when key got changed during relocation Nov 23, 2020
@maqi maqi merged commit 2540a27 into maidsafe:master Nov 23, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants