File tree Expand file tree Collapse file tree 2 files changed +2
-4
lines changed
Expand file tree Collapse file tree 2 files changed +2
-4
lines changed Original file line number Diff line number Diff line change @@ -246,9 +246,8 @@ impl<I: Persistable> SegmentCache<I> {
246246 }
247247
248248 pub async fn get_items ( & mut self , height_range : Range < u32 > ) -> StorageResult < Vec < I > > {
249- if height_range. start > height_range. end {
250- panic ! ( "Invalid height range: start > end, {:?}" , height_range) ;
251- }
249+ debug_assert ! ( height_range. start <= height_range. end) ;
250+
252251 let storage_start_idx = self . height_to_index ( height_range. start ) ;
253252 let storage_end_idx = self . height_to_index ( height_range. end ) ;
254253
Original file line number Diff line number Diff line change @@ -27,7 +27,6 @@ fn create_test_header(height: u32) -> BlockHeader {
2727fn create_test_filter_header ( height : u32 ) -> FilterHeader {
2828 // Create unique filter headers
2929 let mut bytes = [ 0u8 ; 32 ] ;
30- // This is made to avoid having a header
3130 bytes[ 0 ..4 ] . copy_from_slice ( & height. to_le_bytes ( ) ) ;
3231 FilterHeader :: from_raw_hash ( dashcore_hashes:: sha256d:: Hash :: from_byte_array ( bytes) )
3332}
You can’t perform that action at this time.
0 commit comments