Merge pull request #517 from lbryio/fix-filter-by-outpoint

fix filter files by outpoint
This commit is contained in:
Jack Robison 2017-03-08 09:40:14 -05:00 committed by GitHub
commit 74754c9870
3 changed files with 6 additions and 3 deletions

View file

@ -23,7 +23,7 @@ at anytime.
### Fixed
* Added string comparison to ClaimOutpoint (needed to look things up by outpoint)
* Remove unused API commands from daemon
*
* Fix file filter `outpoint`
*
## [0.9.0rc12] - 2017-03-06

View file

@ -15,6 +15,7 @@ from lbrynet.lbryfile.client.EncryptedFileDownloader import EncryptedFileDownloa
from lbrynet.lbryfilemanager.EncryptedFileStatusReport import EncryptedFileStatusReport
from lbrynet.interfaces import IStreamDownloaderFactory
from lbrynet.lbryfile.StreamDescriptor import save_sd_info
from lbrynet.core.Wallet import ClaimOutpoint
log = logging.getLogger(__name__)
@ -49,6 +50,7 @@ class ManagedEncryptedFileDownloader(EncryptedFileSaver):
self.sd_hash = None
self.txid = None
self.nout = None
self.outpoint = None
self.name = None
self.claim_id = None
self.rowid = rowid
@ -118,6 +120,7 @@ class ManagedEncryptedFileDownloader(EncryptedFileSaver):
self.name = name
self.txid = txid
self.nout = nout
self.outpoint = ClaimOutpoint(self.txid, self.nout)
else:
raise NoSuchSDHash(self.sd_hash)
self.claim_id = yield self.wallet.get_claimid(self.name, self.txid, self.nout)

View file

@ -88,10 +88,10 @@ class Wallet(object):
pass
def get_claim_metadata_for_sd_hash(self, sd_hash):
return "fakeuri", "faketxid", "fakenout"
return "fakeuri", "aa04a949348f9f094d503e5816f0cfb57ee68a22f6d08d149217d071243e0377", 1
def get_claimid(self, name, txid=None, nout=None):
return "fake claimid"
return "aa04a949348f9f094d503e5816f0cfb57ee68a22f6d08d149217d071243e0378"
class PeerFinder(object):