Add ValidatorInfo to PeerContacts. #14112
build+test.yml
on: pull_request
rustfmt
13s
check
1m 30s
test
28m 1s
clippy
1m 26s
web-client
2m 58s
web-client-lib
3m 50s
reconnect-test
12m 16s
Annotations
5 warnings
unused import: `TaggedSignable`:
validator/src/validator.rs#L41
warning: unused import: `TaggedSignable`
--> validator/src/validator.rs:41:37
|
41 | tagged_signing::{TaggedKeyPair, TaggedSignable, TaggedSigned},
| ^^^^^^^^^^^^^^
|
= note: `#[warn(unused_imports)]` on by default
|
using `clone` on type `PeerId` which implements the `Copy` trait:
network-libp2p/src/discovery/peer_contacts.rs#L761
warning: using `clone` on type `PeerId` which implements the `Copy` trait
--> network-libp2p/src/discovery/peer_contacts.rs:761:29
|
761 | ... 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#L731
warning: using `Option.and_then(|x| Some(y))`, which is more succinctly expressed as `map(|x| y)`
--> network-libp2p/src/discovery/peer_contacts.rs:731:34
|
731 | contact.validator_info = self.validator_record_signing.as_ref().and_then(|callback| {
| __________________________________^
732 | | let tagged_signed = (callback)(contact.peer_id(), contact.timestamp);
733 | | Some(ValidatorInfo {
734 | | validator_address: tagged_signed.record.validator_address.clone(),
735 | | signature: tagged_signed.signature.clone(),
736 | | })
737 | | });
| |__________^
|
= 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
|
731 ~ contact.validator_info = self.validator_record_signing.as_ref().map(|callback| {
732 | let tagged_signed = (callback)(contact.peer_id(), contact.timestamp);
733 ~ ValidatorInfo {
734 + validator_address: tagged_signed.record.validator_address.clone(),
735 + signature: tagged_signed.signature.clone(),
736 + }
|
|
use of `or_insert` to construct default value:
network-libp2p/src/discovery/peer_contacts.rs#L587
warning: use of `or_insert` to construct default value
--> network-libp2p/src/discovery/peer_contacts.rs:587:18
|
587 | .or_insert(HashSet::new())
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default
|
use of `or_insert` to construct default value:
network-libp2p/src/discovery/peer_contacts.rs#L516
warning: use of `or_insert` to construct default value
--> network-libp2p/src/discovery/peer_contacts.rs:516:18
|
516 | .or_insert(HashSet::new())
| ^^^^^^^^^^^^^^^^^^^^^^^^^ help: try: `or_default()`
|
= help: for further information visit https://rust-lang.github.io/rust-clippy/master/index.html#unwrap_or_default
= note: `#[warn(clippy::unwrap_or_default)]` on by default
|
Artifacts
Produced during runtime
Name | Size | |
---|---|---|
reconnect-test-logs
|
286 KB |
|