mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-13 09:21:05 +00:00
client/authority-discovery: Terminate when network does (#5562)
* client/authority-discovery: Add test ensure termination on network termi * client/authority-discovery: Terminate when network does When the dht event stream returns Poll::Ready(None) it is likely due to the network terminating. When the network terminates due to the node itself shutting down or due to a fatal error, there is no purpose in continuing to run the authority discovery module. * client/authority-discovery/src/lib: Apply suggestions Co-Authored-By: André Silva <123550+andresilva@users.noreply.github.com> Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
This commit is contained in:
@@ -40,17 +40,20 @@ pub enum Error {
|
||||
MatchingHashedAuthorityIdWithAuthorityId,
|
||||
/// Failed to set the authority discovery peerset priority group in the peerset module.
|
||||
SettingPeersetPriorityGroup(String),
|
||||
/// The sender side of the dht event stream has been closed likely due to the network
|
||||
/// terminating.
|
||||
DhtEventStreamTerminated,
|
||||
/// Failed to encode a protobuf payload.
|
||||
EncodingProto(prost::EncodeError),
|
||||
/// Failed to decode a protobuf payload.
|
||||
DecodingProto(prost::DecodeError),
|
||||
/// Failed to encode or decode scale payload
|
||||
/// Failed to encode or decode scale payload.
|
||||
EncodingDecodingScale(codec::Error),
|
||||
/// Failed to parse a libp2p multi address.
|
||||
ParsingMultiaddress(libp2p::core::multiaddr::Error),
|
||||
/// Failed to sign using a specific public key
|
||||
/// Failed to sign using a specific public key.
|
||||
MissingSignature(CryptoTypePublicPair),
|
||||
/// Failed to sign using all public keys
|
||||
/// Failed to sign using all public keys.
|
||||
Signing,
|
||||
/// Failed to register Prometheus metric.
|
||||
Prometheus(prometheus_endpoint::PrometheusError),
|
||||
|
||||
Reference in New Issue
Block a user