mirror of
https://github.com/pezkuwichain/pezkuwi-subxt.git
synced 2026-06-17 09:01:02 +00:00
Runtime diagnostics for leaked messages in unbounded channels (#12971)
This commit is contained in:
@@ -1364,7 +1364,7 @@ impl<Block: BlockT> GossipValidator<Block> {
|
||||
None => None,
|
||||
};
|
||||
|
||||
let (tx, rx) = tracing_unbounded("mpsc_grandpa_gossip_validator");
|
||||
let (tx, rx) = tracing_unbounded("mpsc_grandpa_gossip_validator", 100_000);
|
||||
let val = GossipValidator {
|
||||
inner: parking_lot::RwLock::new(Inner::new(config)),
|
||||
set_state,
|
||||
|
||||
@@ -70,6 +70,7 @@ impl<B: BlockT> NeighborPacketWorker<B> {
|
||||
pub(super) fn new(rebroadcast_period: Duration) -> (Self, NeighborPacketSender<B>) {
|
||||
let (tx, rx) = tracing_unbounded::<(Vec<PeerId>, NeighborPacket<NumberFor<B>>)>(
|
||||
"mpsc_grandpa_neighbor_packet_worker",
|
||||
100_000,
|
||||
);
|
||||
let delay = Delay::new(rebroadcast_period);
|
||||
|
||||
|
||||
@@ -135,7 +135,7 @@ impl NetworkEventStream for TestNetwork {
|
||||
&self,
|
||||
_name: &'static str,
|
||||
) -> Pin<Box<dyn Stream<Item = NetworkEvent> + Send>> {
|
||||
let (tx, rx) = tracing_unbounded("test");
|
||||
let (tx, rx) = tracing_unbounded("test", 100_000);
|
||||
let _ = self.sender.unbounded_send(Event::EventStream(tx));
|
||||
Box::pin(rx)
|
||||
}
|
||||
@@ -253,7 +253,7 @@ fn voter_set_state() -> SharedVoterSetState<Block> {
|
||||
|
||||
// needs to run in a tokio runtime.
|
||||
pub(crate) fn make_test_network() -> (impl Future<Output = Tester>, TestNetwork) {
|
||||
let (tx, rx) = tracing_unbounded("test");
|
||||
let (tx, rx) = tracing_unbounded("test", 100_000);
|
||||
let net = TestNetwork { sender: tx };
|
||||
|
||||
#[derive(Clone)]
|
||||
|
||||
Reference in New Issue
Block a user