Runtime diagnostics for leaked messages in unbounded channels (#12971)

This commit is contained in:
Dmitry Markin
2022-12-23 16:03:08 +03:00
committed by GitHub
parent 70e9f8e920
commit 34eb463d99
37 changed files with 257 additions and 134 deletions
@@ -579,7 +579,7 @@ mod tests {
impl TestChainState {
fn new() -> (Self, ImportNotifications<Block>) {
let (tx, rx) = tracing_unbounded("test");
let (tx, rx) = tracing_unbounded("test", 100_000);
let state =
TestChainState { sender: tx, known_blocks: Arc::new(Mutex::new(HashMap::new())) };
@@ -680,7 +680,7 @@ mod tests {
// enact all dependencies before importing the message
enact_dependencies(&chain_state);
let (global_tx, global_rx) = tracing_unbounded("test");
let (global_tx, global_rx) = tracing_unbounded("test", 100_000);
let until_imported = UntilGlobalMessageBlocksImported::new(
import_notifications,
@@ -708,7 +708,7 @@ mod tests {
let (chain_state, import_notifications) = TestChainState::new();
let block_status = chain_state.block_status();
let (global_tx, global_rx) = tracing_unbounded("test");
let (global_tx, global_rx) = tracing_unbounded("test", 100_000);
let until_imported = UntilGlobalMessageBlocksImported::new(
import_notifications,
@@ -896,7 +896,7 @@ mod tests {
let (chain_state, import_notifications) = TestChainState::new();
let block_status = chain_state.block_status();
let (global_tx, global_rx) = tracing_unbounded("test");
let (global_tx, global_rx) = tracing_unbounded("test", 100_000);
let block_sync_requester = TestBlockSyncRequester::default();