File tree 1 file changed +6
-4
lines changed
1 file changed +6
-4
lines changed Original file line number Diff line number Diff line change @@ -64,10 +64,9 @@ impl EnvTask {
64
64
blocks. next ( ) . instrument ( info_span ! ( "EnvTask::task_fut::stream" ) ) . await
65
65
{
66
66
let Some ( block) = blocks. last ( ) else {
67
- // Clear the env, as the block has changed but we can't
68
- // get a new one
67
+ // This case occurs when there are no changes to the block,
68
+ // so we do nothing.
69
69
debug ! ( "empty filter changes" ) ;
70
- let _ = sender. send ( None ) ;
71
70
continue ;
72
71
} ;
73
72
let span = info_span ! ( "EnvTask::task_fut::loop" , hash = %block, number = tracing:: field:: Empty ) ;
@@ -84,13 +83,16 @@ impl EnvTask {
84
83
let _span = span. enter ( ) ;
85
84
let _ = sender. send ( None ) ;
86
85
debug ! ( "block not found" ) ;
86
+ // This may mean the chain had a rollback, so the next poll
87
+ // should find something.
87
88
continue ;
88
89
}
89
90
Err ( err) => {
90
91
let _span = span. enter ( ) ;
91
92
let _ = sender. send ( None ) ;
92
93
error ! ( %err, "Failed to get latest block" ) ;
93
- break ;
94
+ // Error may be transient, so we should not break the loop.
95
+ continue ;
94
96
}
95
97
} ;
96
98
span. record ( "number" , previous. number ) ;
You can’t perform that action at this time.
0 commit comments