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 @@ -467,9 +467,8 @@ impl NetworkExtension<Event> for Extension {
467467 if let Some ( root) = restore. next_to_feed ( ) {
468468 self . send_chunk_request ( & block, & root) ;
469469 } else {
470- cdebug ! ( SYNC , "Transitioning state to {:?}" , State :: Full ) ;
471470 self . client . force_update_best_block ( & block) ;
472- self . state = State :: Full ;
471+ self . transition_to_full ( ) ;
473472 }
474473 }
475474 State :: Full => {
@@ -1041,12 +1040,16 @@ impl Extension {
10411040 if let Some ( root) = restore. next_to_feed ( ) {
10421041 self . send_chunk_request ( & block, & root) ;
10431042 } else {
1044- cdebug ! ( SYNC , "Transitioning state to {:?}" , State :: Full ) ;
10451043 self . client . force_update_best_block ( & block) ;
1046- self . state = State :: Full ;
1044+ self . transition_to_full ( ) ;
10471045 }
10481046 }
10491047 }
1048+
1049+ fn transition_to_full ( & mut self ) {
1050+ cdebug ! ( SYNC , "Transitioning state to {:?}" , State :: Full ) ;
1051+ self . state = State :: Full ;
1052+ }
10501053}
10511054
10521055pub struct BlockSyncSender ( EventSender < Event > ) ;
You can’t perform that action at this time.
0 commit comments