示例#1
0
 async def syncing(self) -> Union[bool, SyncProgress]:
     res = await self.event_bus.request(SyncingRequest(), TO_NETWORKING_BROADCAST_CONFIG)
     if res.is_syncing:
         return {
             "startingBlock": res.progress.starting_block,
             "currentBlock": res.progress.current_block,
             "highestBlock": res.progress.highest_block
         }
     return False
示例#2
0
文件: eth.py 项目: sjyi/py-evm
 async def syncing(self) -> Union[bool, SyncProgress]:
     res = await self._event_bus.request(SyncingRequest())
     if res.is_syncing:
         return {
             "startingBlock": res.progress.starting_block,
             "currentBlock": res.progress.current_block,
             "highestBlock": res.progress.highest_block
         }
     return False