def get_proof(self):
        """Returns the jsonifyable proof of the challenge answer for this contract

        :returns: the proof object for this contracts challenge answer,
            as a dictionary:
            {
                'file_hash': 'associated file hash',
                'proof': '...proof object string...'
            }
            or None, if the challenge has already been answered
        """
        if (self.answered):
            # we don't answer challenges that have already been answered
            # there isn't any point
            return None

        # ok now we will read from file
        try:
            if (self.spoof):
                proof = self.client.heartbeat.prove(
                    RandomIO(self.seed, self.size),
                    self.challenge,
                    self.tag)
            else:
                with self.file_lock, open(self.path, 'rb') as f:
                    proof = self.client.heartbeat.prove(
                        f,
                        self.challenge,
                        self.tag)
        except __HOLE__:
            raise DownstreamError('Unable to open chunk file.')

        data = dict(file_hash=self.hash,
                    proof=proof.todict())

        return data
dataset/ETHPy150Open StorjOld/downstream-farmer/downstream_farmer/contract.py/DownstreamContract.get_proof