(self)
| 1483 | return result |
| 1484 | |
| 1485 | def get_status(self) -> Response: |
| 1486 | if self.available: |
| 1487 | return api_response(result=dict(status="ready")) |
| 1488 | else: |
| 1489 | to_sync = blocks_to_sync(self.rpc_client) |
| 1490 | if to_sync > 0: |
| 1491 | return api_response(result=dict(status="syncing", blocks_to_sync=to_sync)) |
| 1492 | else: |
| 1493 | return api_response(result=dict(status="unavailable")) |
| 1494 | |
| 1495 | def shutdown(self) -> Response: |
| 1496 | shutdown_greenlet = spawn_named("trigger shutdown", self.raiden_api.shutdown) |