Skip to content

Commit

Permalink
core/src: tweak key ownership in SignedEnvelope constructor (libp2p#2510
Browse files Browse the repository at this point in the history
)
  • Loading branch information
laurentsenta committed Feb 14, 2022
1 parent 60666f5 commit c5a4cc2
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion core/src/peer_record.rs
Original file line number Diff line number Diff line change
Expand Up @@ -88,7 +88,7 @@ impl PeerRecord {
};

let envelope = SignedEnvelope::new(
key,
&key,
String::from(DOMAIN_SEP),
PAYLOAD_TYPE.as_bytes().to_vec(),
payload,
Expand Down
2 changes: 1 addition & 1 deletion core/src/signed_envelope.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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>,
Expand Down

0 comments on commit c5a4cc2

Please sign in to comment.