Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

core/src/signed_envelope: Don't take ownership of key in SignedEnvelope::new #2510

Closed
mxinden opened this issue Feb 11, 2022 · 1 comment · Fixed by #2516
Closed

core/src/signed_envelope: Don't take ownership of key in SignedEnvelope::new #2510

mxinden opened this issue Feb 11, 2022 · 1 comment · Fixed by #2516
Labels
difficulty:easy getting-started Issues that can be tackled if you don't know the internals of libp2p very well help wanted

Comments

@mxinden
Copy link
Member

mxinden commented Feb 11, 2022

This boils down to the patch below:

diff --git a/core/src/signed_envelope.rs b/core/src/signed_envelope.rs
index 73efcc99..cdf8e9f3 100644
--- a/core/src/signed_envelope.rs
+++ b/core/src/signed_envelope.rs
@@ -19,7 +19,7 @@ pub struct SignedEnvelope {
 impl SignedEnvelope {
     /// Constructs a new [`SignedEnvelope`].
     pub fn new(
-        key: Keypair,
+        key: &Keypair,
         domain_separation: String,
         payload_type: Vec<u8>,
         payload: Vec<u8>,
@mxinden mxinden added difficulty:easy help wanted getting-started Issues that can be tackled if you don't know the internals of libp2p very well labels Feb 11, 2022
@laurentsenta
Copy link
Contributor

Happy take this, thanks for sharing the first step!

laurentsenta added a commit to laurentsenta/rust-libp2p that referenced this issue Feb 14, 2022
@mxinden mxinden linked a pull request Feb 14, 2022 that will close this issue
3 tasks
laurentsenta added a commit to laurentsenta/rust-libp2p that referenced this issue Feb 14, 2022
laurentsenta added a commit to laurentsenta/rust-libp2p that referenced this issue Feb 14, 2022
laurentsenta added a commit to laurentsenta/rust-libp2p that referenced this issue Feb 15, 2022
laurentsenta added a commit to laurentsenta/rust-libp2p that referenced this issue Feb 15, 2022
laurentsenta added a commit to laurentsenta/rust-libp2p that referenced this issue Feb 15, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
difficulty:easy getting-started Issues that can be tackled if you don't know the internals of libp2p very well help wanted
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants