File tree Expand file tree Collapse file tree 2 files changed +1
-421
lines changed
substrate/client/network/sync/src Expand file tree Collapse file tree 2 files changed +1
-421
lines changed Original file line number Diff line number Diff line change @@ -212,31 +212,6 @@ impl<B: BlockT> BlockCollection<B> {
212
212
ready
213
213
}
214
214
215
- /// Returns the block header of the first block that is ready for importing.
216
- /// `from` is the maximum block number for the start of the range that we are interested in.
217
- /// The function will return None if the first block ready is higher than `from`.
218
- /// The logic is structured to be consistent with ready_blocks().
219
- pub fn first_ready_block_header ( & self , from : NumberFor < B > ) -> Option < B :: Header > {
220
- let mut prev = from;
221
- for ( & start, range_data) in & self . blocks {
222
- if start > prev {
223
- break
224
- }
225
-
226
- match range_data {
227
- BlockRangeState :: Complete ( blocks) => {
228
- let len = ( blocks. len ( ) as u32 ) . into ( ) ;
229
- prev = start + len;
230
- if let Some ( BlockData { block, .. } ) = blocks. first ( ) {
231
- return block. header . clone ( )
232
- }
233
- } ,
234
- _ => continue ,
235
- }
236
- }
237
- None
238
- }
239
-
240
215
pub fn clear_queued ( & mut self , hash : & B :: Hash ) {
241
216
if let Some ( ( from, to) ) = self . queued_blocks . remove ( hash) {
242
217
let mut block_num = from;
You can’t perform that action at this time.
0 commit comments