Ejemplo n.º 1
0
 async def get_block_witness_hashes(
         self,
         block_hash: Hash32,
         timeout: float = None) -> Tuple[Hash32, ...]:
     response = await self._event_bus.request(
         GetBlockWitnessHashesRequest(self.session, block_hash, timeout),
         self._broadcast_config)
     pass_or_raise(response)
     return tuple(response.node_hashes)
Ejemplo n.º 2
0
 async def coro_get_contract_code(self, block_hash: Hash32,
                                  address: Address) -> bytes:
     event = GetContractCodeRequest(block_hash, address)
     return pass_or_raise(await self.event_bus.request(
         event, TO_NETWORKING_BROADCAST_CONFIG)).bytez
Ejemplo n.º 3
0
 async def coro_get_account(self, block_hash: Hash32,
                            address: Address) -> Account:
     event = GetAccountRequest(block_hash, address)
     return pass_or_raise(await self.event_bus.request(
         event, TO_NETWORKING_BROADCAST_CONFIG)).account
Ejemplo n.º 4
0
 async def coro_get_receipts(self, block_hash: Hash32) -> List[Receipt]:
     event = GetReceiptsRequest(block_hash)
     return pass_or_raise(await self.event_bus.request(
         event, TO_NETWORKING_BROADCAST_CONFIG)).receipts
Ejemplo n.º 5
0
 async def coro_get_block_body_by_hash(self,
                                       block_hash: Hash32) -> BlockBody:
     event = GetBlockBodyByHashRequest(block_hash)
     return pass_or_raise(await self.event_bus.request(
         event, TO_NETWORKING_BROADCAST_CONFIG)).block_body