@@ -304,23 +304,22 @@ def _announce_and_observe_participants(self):
304304 # Check if should announce the participants this time.
305305 send_interval = self .get_announce_participants_send_interval ()
306306 last_ts = self .last_time_announce_participants
307- if last_ts is not None and self .time () - last_ts < send_interval :
308- return
309-
310- log_str = f"Announcing { len (self ._announced_participating )} participants:"
311- log_str += "" .join ([
312- f"\n \t { self .netmon .network_node_eeid (oracle )} <{ oracle } > { self .oracle_sync_get_node_local_availability (oracle )} "
313- for oracle in self ._announced_participating
314- ])
315- self .P (log_str )
307+ if last_ts is None or self .time () - last_ts >= send_interval :
308+ log_str = f"Announcing { len (self ._announced_participating )} participants:"
309+ log_str += "" .join ([
310+ f"\n \t { self .netmon .network_node_eeid (oracle )} <{ oracle } > { self .oracle_sync_get_node_local_availability (oracle )} "
311+ for oracle in self ._announced_participating
312+ ])
313+ self .P (log_str )
316314
317- oracle_data = {
318- OracleSyncCt .ANNOUNCED_PARTICIPANTS : list (self ._announced_participating ),
319- OracleSyncCt .STAGE : self ._get_current_state (),
320- }
321- self .bc .sign (oracle_data , add_data = True , use_digest = True )
322- self .add_payload_by_fields (oracle_data = oracle_data )
323- self .last_time_announce_participants = self .time ()
315+ oracle_data = {
316+ OracleSyncCt .ANNOUNCED_PARTICIPANTS : list (self ._announced_participating ),
317+ OracleSyncCt .STAGE : self ._get_current_state (),
318+ }
319+ self .bc .sign (oracle_data , add_data = True , use_digest = True )
320+ self .add_payload_by_fields (oracle_data = oracle_data )
321+ self .last_time_announce_participants = self .time ()
322+ # endif need to announce
324323 # endif announce participants
325324
326325 # Observe the other oracles' announcements.
0 commit comments