mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 05:51:02 +00:00
client/authority-discovery: Throttle DHT requests (#7018)
* client/authority-discovery: Throttle DHT requests Instead of passing one DHT query for each authority down to the network every query interval, only pass MAX_IN_FLIGHT_LOOKUPS at a given point in time, triggering new ones when previous ones return. * client/authority-discovery/worker/test: Fix wrong constant
This commit is contained in:
@@ -34,10 +34,8 @@ pub enum Error {
|
||||
HashingAuthorityId(libp2p::core::multiaddr::multihash::EncodeError),
|
||||
/// Failed calling into the Substrate runtime.
|
||||
CallingRuntime(sp_blockchain::Error),
|
||||
/// From the Dht we only get the hashed authority id. In order to retrieve the actual authority id and to ensure it
|
||||
/// is actually an authority, we match the hash against the hash of the authority id of all other authorities. This
|
||||
/// error is the result of the above failing.
|
||||
MatchingHashedAuthorityIdWithAuthorityId,
|
||||
/// Received a dht record with a key that does not match any in-flight awaited keys.
|
||||
ReceivingUnexpectedRecord,
|
||||
/// Failed to set the authority discovery peerset priority group in the peerset module.
|
||||
SettingPeersetPriorityGroup(String),
|
||||
/// Failed to encode a protobuf payload.
|
||||
|
||||
Reference in New Issue
Block a user