From 1c764068b9b2d0844fc16224b257f84bc06c86e9 Mon Sep 17 00:00:00 2001 From: Svyatoslav Nikolsky Date: Thu, 16 May 2024 14:57:15 +0300 Subject: [PATCH] added code comment --- bridges/relays/client-substrate/src/client.rs | 3 +++ 1 file changed, 3 insertions(+) diff --git a/bridges/relays/client-substrate/src/client.rs b/bridges/relays/client-substrate/src/client.rs index 8a9b5c767aff..2e7cb7455f76 100644 --- a/bridges/relays/client-substrate/src/client.rs +++ b/bridges/relays/client-substrate/src/client.rs @@ -79,6 +79,8 @@ pub fn is_ancient_block + PartialOrd + Saturating>(block: N, best: /// Opaque justifications subscription type. pub struct Subscription( pub(crate) Mutex>>, + // The following field is not explicitly used by the code. But when it is dropped, + // the bakground task receives a shutdown signal. #[allow(dead_code)] pub(crate) futures::channel::oneshot::Sender<()>, ); @@ -856,6 +858,7 @@ impl Subscription { match item { Some(item) => Some((item, Some(this))), None => { + // let's make it explicit here let _ = this.1.send(()); None },