mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-04-28 14:27:57 +00:00
client/authority-discovery: Rework error handling (#5631)
* client/authority-discovery: Rework error handling Instead of `handle_dht_events` returning a `Result<(), Error>`, return a `Poll<Error>` where `Poll::Pending` signals that there are no more events to handle and `Poll::Ready(Error)` signals that a fatal error occured. Non fatal errors are handled within `handle_dht_events` directly, thus looping in `poll` is not necessary anymore. * client/authority-discovery: Return () instead of error on termiantion * Update client/authority-discovery/src/lib.rs Co-Authored-By: André Silva <123550+andresilva@users.noreply.github.com> Co-authored-by: Bastian Köcher <bkchr@users.noreply.github.com> Co-authored-by: André Silva <123550+andresilva@users.noreply.github.com>
This commit is contained in:
@@ -40,9 +40,6 @@ 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.
|
||||
|
||||
Reference in New Issue
Block a user