diff --git a/lbrynet/reflector/client/client.py b/lbrynet/reflector/client/client.py index 763aa6735..54afd78c9 100644 --- a/lbrynet/reflector/client/client.py +++ b/lbrynet/reflector/client/client.py @@ -124,8 +124,8 @@ class EncryptedFileReflectorClient(Protocol): def set_blobs_to_send(self, blobs_to_send): for blob in blobs_to_send: - if blob not in self.blob_hashes_to_send: - self.blob_hashes_to_send.append(blob) + if blob.blob_hash not in self.blob_hashes_to_send: + self.blob_hashes_to_send.append(blob.blob_hash) def get_blobs_to_send(self): def _show_missing_blobs(filtered): @@ -308,9 +308,10 @@ class EncryptedFileReflectorClient(Protocol): return d elif self.blob_hashes_to_send: # open the next blob to send - blob = self.blob_hashes_to_send[0] + blob_hash = self.blob_hashes_to_send[0] self.blob_hashes_to_send = self.blob_hashes_to_send[1:] - d = self.open_blob_for_reading(blob) + d = self.blob_manager.get_blob(blob_hash) + d.addCallback(self.open_blob_for_reading) d.addCallbacks(lambda _: self.send_blob_info(), lambda err: self.skip_missing_blob(err, blob.blob_hash)) return d