@@ -17,7 +17,6 @@ use crate::subspace::{
1717} ;
1818use anyhow:: Ok ;
1919use std:: assert_matches:: assert_matches;
20- use std:: time:: Duration ;
2120use subxt:: ext:: futures:: { FutureExt , StreamExt } ;
2221
2322/// The extrinsic and event for a recent sudo call.
@@ -643,7 +642,6 @@ async fn no_expected_test_slot_time_alert() -> anyhow::Result<()> {
643642 let second_block = mock_block_info ( 200000 , Slot ( 200 ) ) ;
644643
645644 let mut naive_slot_time_monitor = MemorySlotTimeMonitor :: new ( SlotTimeMonitorConfig :: new (
646- Duration :: from_secs ( 1 ) ,
647645 2 , // max_block_buffer - small buffer for testing
648646 2f64 , // slow_slots_threshold
649647 0.1f64 , // fast_slots_threshold
@@ -676,7 +674,6 @@ async fn expected_test_slot_time_alert() -> anyhow::Result<()> {
676674 let second_block = mock_block_info ( 200000 , Slot ( 200 ) ) ;
677675
678676 let mut strict_slot_time_monitor = MemorySlotTimeMonitor :: new ( SlotTimeMonitorConfig :: new (
679- Duration :: from_secs ( 1 ) ,
680677 2 , // max_block_buffer - small buffer for testing
681678 0.2f64 , // slow_slots_threshold
682679 0.1f64 , // fast_slots_threshold
@@ -732,7 +729,6 @@ async fn test_slot_time_above_slow_threshold() -> anyhow::Result<()> {
732729 let second_block = mock_block_info ( 200000 , Slot ( 101 ) ) ;
733730
734731 let mut slot_time_monitor = MemorySlotTimeMonitor :: new ( SlotTimeMonitorConfig :: new (
735- Duration :: from_secs ( 1 ) ,
736732 2 , // max_block_buffer - small buffer for testing
737733 2f64 , // slow_slots_threshold
738734 0.01f64 , // fast_slots_threshold
@@ -788,7 +784,6 @@ async fn test_slot_time_below_fast_threshold() -> anyhow::Result<()> {
788784 let second_block = mock_block_info ( 200000 , Slot ( 200 ) ) ;
789785
790786 let mut slot_time_monitor = MemorySlotTimeMonitor :: new ( SlotTimeMonitorConfig :: new (
791- Duration :: from_secs ( 1 ) ,
792787 2 , // max_block_buffer - small buffer for testing
793788 10f64 , // slow_slots_threshold
794789 2f64 , // fast_slots_threshold
@@ -840,7 +835,6 @@ async fn test_slot_time_alerts_ignored_during_startup() -> anyhow::Result<()> {
840835 let second_block = mock_block_info ( 2000 , Slot ( 200 ) ) ;
841836
842837 let mut slot_time_monitor = MemorySlotTimeMonitor :: new ( SlotTimeMonitorConfig :: new (
843- Duration :: from_secs ( 1 ) ,
844838 2 , // max_block_buffer - small buffer for testing
845839 0.5f64 , // slow_slots_threshold (0.1 < 0.5, so would normally trigger)
846840 0.1f64 , // fast_slots_threshold
@@ -874,7 +868,6 @@ async fn test_slot_time_alerts_not_triggered_when_buffer_not_full() -> anyhow::R
874868 let second_block = mock_block_info ( 200000 , Slot ( 200 ) ) ;
875869
876870 let mut slot_time_monitor = MemorySlotTimeMonitor :: new ( SlotTimeMonitorConfig :: new (
877- Duration :: from_secs ( 1 ) ,
878871 3 , // max_block_buffer - need 3 blocks to fill buffer
879872 0.5f64 , // slow_slots_threshold (1.0 > 0.5, so would trigger if buffer was full)
880873 0.1f64 , // fast_slots_threshold
0 commit comments