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 {
467
467
if let Some ( root) = restore. next_to_feed ( ) {
468
468
self . send_chunk_request ( & block, & root) ;
469
469
} else {
470
- cdebug ! ( SYNC , "Transitioning state to {:?}" , State :: Full ) ;
471
470
self . client . force_update_best_block ( & block) ;
472
- self . state = State :: Full ;
471
+ self . transition_to_full ( ) ;
473
472
}
474
473
}
475
474
State :: Full => {
@@ -1041,12 +1040,16 @@ impl Extension {
1041
1040
if let Some ( root) = restore. next_to_feed ( ) {
1042
1041
self . send_chunk_request ( & block, & root) ;
1043
1042
} else {
1044
- cdebug ! ( SYNC , "Transitioning state to {:?}" , State :: Full ) ;
1045
1043
self . client . force_update_best_block ( & block) ;
1046
- self . state = State :: Full ;
1044
+ self . transition_to_full ( ) ;
1047
1045
}
1048
1046
}
1049
1047
}
1048
+
1049
+ fn transition_to_full ( & mut self ) {
1050
+ cdebug ! ( SYNC , "Transitioning state to {:?}" , State :: Full ) ;
1051
+ self . state = State :: Full ;
1052
+ }
1050
1053
}
1051
1054
1052
1055
pub struct BlockSyncSender ( EventSender < Event > ) ;
You can’t perform that action at this time.
0 commit comments