mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-07-15 23:05:45 +00:00
Make public addresses go first in authority discovery DHT records (#3757)
Make sure explicitly set by the operator public addresses go first in the authority discovery DHT records. Also update `Discovery` behavior to eliminate duplicates in the returned addresses. This PR should improve situation with https://github.com/paritytech/polkadot-sdk/issues/3519. Obsoletes https://github.com/paritytech/polkadot-sdk/pull/3657.
This commit is contained in:
@@ -80,6 +80,10 @@ pub struct WorkerConfig {
|
||||
/// Defaults to `true` to avoid the surprise factor.
|
||||
pub publish_non_global_ips: bool,
|
||||
|
||||
/// Public addresses set by the node operator to always publish first in the authority
|
||||
/// discovery DHT record.
|
||||
pub public_addresses: Vec<Multiaddr>,
|
||||
|
||||
/// Reject authority discovery records that are not signed by their network identity (PeerId)
|
||||
///
|
||||
/// Defaults to `false` to provide compatibility with old versions
|
||||
@@ -104,6 +108,7 @@ impl Default for WorkerConfig {
|
||||
// `authority_discovery_dht_event_received`.
|
||||
max_query_interval: Duration::from_secs(10 * 60),
|
||||
publish_non_global_ips: true,
|
||||
public_addresses: Vec::new(),
|
||||
strict_record_validation: false,
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user