MCPcopy
hub / github.com/raiden-network/raiden / loop_until_stop

Method loop_until_stop

raiden/tasks.py:225–230  ·  view source on GitHub ↗
(self)

Source from the content-addressed store, hash-verified

223 self.callbacks.remove(callback)
224
225 def loop_until_stop(self) -> None:
226 sleep_time = self.sleep_time
227 while self._stop_event and self._stop_event.wait(sleep_time) is not True:
228 latest_block = self.rpc_client.get_block(block_identifier=BLOCK_ID_LATEST)
229
230 self._maybe_run_callbacks(latest_block)
231
232 def _maybe_run_callbacks(self, latest_block: BlockData) -> None:
233 """Run the callbacks if there is at least one new block.

Callers 1

_runMethod · 0.95

Calls 3

_maybe_run_callbacksMethod · 0.95
get_blockMethod · 0.80
waitMethod · 0.45

Tested by

no test coverage detected