mirror of
https://github.com/fluencelabs/rust-libp2p
synced 2025-06-12 17:41:22 +00:00
to/into consistency for PublicKey and PeerId (#2145)
- Change `PublicKey::into_protobuf_encoding` to `PublicKey::to_protobuf_encoding`. - Change `PublicKey::into_peer_id` to `PublicKey::to_peer_id`. - Change `PeerId::from_public_key(PublicKey)` to `PeerId::from_public_key(&PublicKey)`. - Add `From<&PublicKey> for PeerId`. Co-authored-by: Max Inden <mail@max-inden.de>
This commit is contained in:
@ -228,7 +228,7 @@ impl GossipsubCodec {
|
||||
};
|
||||
|
||||
// The key must match the peer_id
|
||||
if source != public_key.clone().into_peer_id() {
|
||||
if source != public_key.to_peer_id() {
|
||||
warn!("Signature verification failed: Public key doesn't match source peer id");
|
||||
return false;
|
||||
}
|
||||
|
Reference in New Issue
Block a user