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>
parent
8576937f
Showing
- substrate/client/authority-discovery/src/error.rs 6 additions, 3 deletionssubstrate/client/authority-discovery/src/error.rs
- substrate/client/authority-discovery/src/lib.rs 19 additions, 11 deletionssubstrate/client/authority-discovery/src/lib.rs
- substrate/client/authority-discovery/src/tests.rs 34 additions, 0 deletionssubstrate/client/authority-discovery/src/tests.rs
Please register or sign in to comment