File tree Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Expand file tree Collapse file tree 1 file changed +7
-4
lines changed Original file line number Diff line number Diff line change @@ -444,9 +444,8 @@ impl NetworkExtension<Event> for Extension {
444444 if let Some ( root) = restore. next_to_feed ( ) {
445445 self . send_chunk_request ( & block, & root) ;
446446 } else {
447- cdebug ! ( SYNC , "Transitioning state to {:?}" , State :: Full ) ;
448447 self . client . force_update_best_block ( & block) ;
449- self . state = State :: Full ;
448+ self . transition_to_full ( ) ;
450449 }
451450 }
452451 State :: Full => {
@@ -1037,12 +1036,16 @@ impl Extension {
10371036 if let Some ( root) = restore. next_to_feed ( ) {
10381037 self . send_chunk_request ( & block, & root) ;
10391038 } else {
1040- cdebug ! ( SYNC , "Transitioning state to {:?}" , State :: Full ) ;
10411039 self . client . force_update_best_block ( & block) ;
1042- self . state = State :: Full ;
1040+ self . transition_to_full ( ) ;
10431041 }
10441042 }
10451043 }
1044+
1045+ fn transition_to_full ( & mut self ) {
1046+ cdebug ! ( SYNC , "Transitioning state to {:?}" , State :: Full ) ;
1047+ self . state = State :: Full ;
1048+ }
10461049}
10471050
10481051pub struct BlockSyncSender ( EventSender < Event > ) ;
You can’t perform that action at this time.
0 commit comments