mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-07-31 00:41:59 +00:00
core/src: Take ref of key in SignedEnvelope & PeerRecord (#2516)
This commit is contained in:
@@ -234,7 +234,7 @@ impl NetworkBehaviour for Behaviour {
|
||||
));
|
||||
}
|
||||
|
||||
let action = match PeerRecord::new(self.keypair.clone(), external_addresses) {
|
||||
let action = match PeerRecord::new(&self.keypair, external_addresses) {
|
||||
Ok(peer_record) => NetworkBehaviourAction::NotifyHandler {
|
||||
peer_id: rendezvous_node,
|
||||
event: handler::OutboundInEvent::NewSubstream {
|
||||
|
@@ -730,7 +730,7 @@ mod tests {
|
||||
) -> NewRegistration {
|
||||
NewRegistration::new(
|
||||
Namespace::from_static(namespace),
|
||||
PeerRecord::new(identity, vec!["/ip4/127.0.0.1/tcp/1234".parse().unwrap()]).unwrap(),
|
||||
PeerRecord::new(&identity, vec!["/ip4/127.0.0.1/tcp/1234".parse().unwrap()]).unwrap(),
|
||||
ttl,
|
||||
)
|
||||
}
|
||||
|
Reference in New Issue
Block a user