File tree Expand file tree Collapse file tree 2 files changed +12
-10
lines changed Expand file tree Collapse file tree 2 files changed +12
-10
lines changed Original file line number Diff line number Diff line change @@ -79,8 +79,6 @@ impl EventProcessor {
7979 . transaction ( )
8080 . map_err ( |e| ExecutionError :: Database ( e. to_string ( ) ) ) ?;
8181
82- let mut operator_added = false ;
83-
8482 for ( index, log) in logs. iter ( ) . enumerate ( ) {
8583 trace ! ( log_index = index, topic = ?log. topic0( ) , "Processing individual log" ) ;
8684
@@ -95,10 +93,7 @@ impl EventProcessor {
9593
9694 // Process log based on signature hash
9795 let result = match * topic0 {
98- SSVContract :: OperatorAdded :: SIGNATURE_HASH => {
99- operator_added = true ;
100- self . process_operator_added ( log, & tx)
101- }
96+ SSVContract :: OperatorAdded :: SIGNATURE_HASH => self . process_operator_added ( log, & tx) ,
10297
10398 SSVContract :: OperatorRemoved :: SIGNATURE_HASH => {
10499 self . process_operator_removed ( log, & tx)
@@ -148,10 +143,6 @@ impl EventProcessor {
148143 }
149144 }
150145
151- if !live && !operator_added {
152- warn ! ( "No OperatorAdded events found in historical sync, there is likely a sync error" ) ;
153- }
154-
155146 metrics:: stop_timer ( timer) ;
156147 self . db
157148 . processed_block ( end_block, & tx)
Original file line number Diff line number Diff line change @@ -510,6 +510,17 @@ impl SsvEventSyncer {
510510 start_block = end_block + 1 ;
511511 }
512512 info ! ( "Historical sync completed" ) ;
513+
514+ if self
515+ . event_processor
516+ . db
517+ . state ( )
518+ . get_all_operators ( )
519+ . is_empty ( )
520+ {
521+ warn ! ( "No OperatorAdded events found in historical sync, there is likely a sync error" ) ;
522+ }
523+
513524 Ok ( ( ) )
514525 }
515526
You can’t perform that action at this time.
0 commit comments