def send_blocks(self, blocks: Tuple[BaseBeaconBlock, ...], request_id: int) -> None: cmd = BeaconBlocks(self.cmd_id_offset, self.snappy_support) header, body = cmd.encode(BeaconBlocksMessage( request_id=request_id, encoded_blocks=tuple(ssz.encode(block) for block in blocks), )) self.transport.send(header, body)
def send_blocks(self, blocks: Tuple[BaseBeaconBlock, ...], request_id: int) -> None: cmd = BeaconBlocks(self.cmd_id_offset, self.snappy_support) header, body = cmd.encode( BeaconBlocksMessage( request_id=request_id, blocks=blocks, )) self.send(header, body)