File tree Expand file tree Collapse file tree 3 files changed +12
-12
lines changed Expand file tree Collapse file tree 3 files changed +12
-12
lines changed Original file line number Diff line number Diff line change 11[package ]
22name = " hermes"
3- version = " 0.5.6 "
3+ version = " 0.5.7 "
44description = " Hermes is an agent that provides Verified Prices from the Pythnet Pyth Oracle."
55edition = " 2021"
66
Original file line number Diff line number Diff line change @@ -323,27 +323,27 @@ where
323323 // Update the aggregate state
324324 let mut aggregate_state = self . into ( ) . data . write ( ) . await ;
325325
326- // Check if the update is new or out of order
327- match aggregate_state. latest_completed_slot {
326+ // Send update event to subscribers. We are purposefully ignoring the result
327+ // because there might be no subscribers.
328+ let _ = match aggregate_state. latest_completed_slot {
328329 None => {
329330 aggregate_state. latest_completed_slot . replace ( slot) ;
330331 self . into ( )
331332 . api_update_tx
332- . send ( AggregationEvent :: New { slot } ) ? ;
333+ . send ( AggregationEvent :: New { slot } )
333334 }
334335 Some ( latest) if slot > latest => {
335336 self . prune_removed_keys ( message_state_keys) . await ;
336337 aggregate_state. latest_completed_slot . replace ( slot) ;
337338 self . into ( )
338339 . api_update_tx
339- . send ( AggregationEvent :: New { slot } ) ? ;
340+ . send ( AggregationEvent :: New { slot } )
340341 }
341- _ => {
342- self . into ( )
343- . api_update_tx
344- . send ( AggregationEvent :: OutOfOrder { slot } ) ?;
345- }
346- }
342+ _ => self
343+ . into ( )
344+ . api_update_tx
345+ . send ( AggregationEvent :: OutOfOrder { slot } ) ,
346+ } ;
347347
348348 aggregate_state. latest_completed_slot = aggregate_state
349349 . latest_completed_slot
You can’t perform that action at this time.
0 commit comments