Extract block announce validation from ChainSync (#1170)

This commit is contained in:
Dmitry Markin
2023-09-04 18:27:53 +03:00
committed by GitHub
parent ddab7156b4
commit 01cdae878d
7 changed files with 731 additions and 550 deletions
+10
View File
@@ -123,6 +123,11 @@ impl<T> TracingUnboundedSender<T> {
s
})
}
/// The number of elements in the channel (proxy function to [`async_channel::Sender`]).
pub fn len(&self) -> usize {
self.inner.len()
}
}
impl<T> TracingUnboundedReceiver<T> {
@@ -139,6 +144,11 @@ impl<T> TracingUnboundedReceiver<T> {
s
})
}
/// The number of elements in the channel (proxy function to [`async_channel::Receiver`]).
pub fn len(&self) -> usize {
self.inner.len()
}
}
impl<T> Drop for TracingUnboundedReceiver<T> {