From b3a467526d3cc99f8477d8087f08a23e2cae2f97 Mon Sep 17 00:00:00 2001 From: Alexandru Vasile Date: Wed, 10 Jan 2024 11:08:29 +0200 Subject: [PATCH] backend: Debug loop times Signed-off-by: Alexandru Vasile --- subxt/src/backend/unstable/mod.rs | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/subxt/src/backend/unstable/mod.rs b/subxt/src/backend/unstable/mod.rs index 3af1f306ae..4c721510e8 100644 --- a/subxt/src/backend/unstable/mod.rs +++ b/subxt/src/backend/unstable/mod.rs @@ -551,16 +551,20 @@ impl Backend for UnstableBackend { let now = std::time::Instant::now(); let mut mem_log = vec![]; + let mut loop_times = 0; // Now we can attempt to associate tx events with pinned blocks. let tx_stream = futures::stream::poll_fn(move |cx| { loop { + loop_times += 1; + if now.elapsed().as_secs() > 240 { println!("Fin block {:?}", unsafe { &FIN_BLOCK }); println!("Pruned block {:?}", unsafe { &PRUNED }); println!("MemLog: {:#?}", mem_log); println!("SeenBlocksLog: {:#?}", seen_blocks); println!("SeenOther: {:#?}", seen_other); + println!("Loop times: {:#?}", loop_times); panic!("{:#?} {:#?} {:#?}", mem_log, seen_blocks, seen_other); }