Skip to content

Add ValidatorInfo to PeerContacts. #14454

Add ValidatorInfo to PeerContacts.

Add ValidatorInfo to PeerContacts. #14454

Triggered via pull request January 31, 2025 14:24
Status Success
Total duration 27m 38s
Artifacts 1

build+test.yml

on: pull_request
Fit to window
Zoom out
Zoom in

Annotations

3 warnings
using `clone` on type `PeerId` which implements the `Copy` trait: network-libp2p/src/discovery/peer_contacts.rs#L843
warning: using `clone` on type `PeerId` which implements the `Copy` trait --> network-libp2p/src/discovery/peer_contacts.rs:843:47 | 843 | Err(_) => return Some(peer_id.clone()), | ^^^^^^^^^^^^^^^ help: try dereferencing it: `*peer_id` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy
using `clone` on type `PeerId` which implements the `Copy` trait: network-libp2p/src/discovery/peer_contacts.rs#L826
warning: using `clone` on type `PeerId` which implements the `Copy` trait --> network-libp2p/src/discovery/peer_contacts.rs:826:33 | 826 | return Some(peer_id.clone()); | ^^^^^^^^^^^^^^^ help: try dereferencing it: `*peer_id` | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#clone_on_copy = note: `#[warn(clippy::clone_on_copy)]` on by default
using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)`: network-libp2p/src/discovery/peer_contacts.rs#L744
warning: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)` --> network-libp2p/src/discovery/peer_contacts.rs:744:34 | 744 | contact.validator_info = self.validator_record_signer.as_ref().and_then(|callback| { | __________________________________^ 745 | | let tagged_signed = (callback)(contact.peer_id(), contact.timestamp); 746 | | Some(ValidatorInfo { 747 | | validator_address: tagged_signed.record.validator_address.clone(), 748 | | signature: tagged_signed.signature.clone(), 749 | | }) 750 | | }); | |__________^ | = help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#bind_instead_of_map = note: `#[warn(clippy::bind_instead_of_map)]` on by default help: use `map` instead | 744 ~ contact.validator_info = self.validator_record_signer.as_ref().map(|callback| { 745 | let tagged_signed = (callback)(contact.peer_id(), contact.timestamp); 746 ~ ValidatorInfo { 747 + validator_address: tagged_signed.record.validator_address.clone(), 748 + signature: tagged_signed.signature.clone(), 749 + } |

Artifacts

Produced during runtime
Name Size
reconnect-test-logs
308 KB