previously only the sd blob was reflected, if the server indicated it
needed the blob then the rest of the stream would follow. this allowed
for many streams to be partially reflected, where for whatever reason
the connection was broken before the full upload was completed. this
meant that on a subsequent run, the client would falsely believe
reflector had the whole stream when it actually only had some portion
of it.
this solution isn’t ideal, I’m most of the way done with a better one,
but this can be deployed now.
When creating a CryptStream, the last blob is always empty. Previously, this
blob wouldn't be deleted and would instead just stick around in the blobfiles
directory.
- Both methods now take an SD hash instead of a path (more logical API
and avoids potential security problems)
- Moves the core logic into functions on a new module,
lbry.core.file_utils
- Adds reveal support for Windows
* Move the blob verification to the actual Blob object
* remove the check on verification time
* remove get_blob_length from BlobManager
Removed because I'm not sure what checking verification time against ctime gets us, except some protection against an accidental modification of the blob.
It is possible (likely) that a manage call is in progress when
`stop` is called. When that happens, _manage will continue to
run, and schedule another call - and the manager won't actually stop,
and will likely cause an error as other components have been torn down.
This fix adds a deferred that gets created when a manage call starts
and is fired when its done. At this points its safe to start the
stopping process. Also add a check to not schedule another manage
call if we're stopped
This fixes https://app.asana.com/0/142330900434470/239832897034382