forked from LBRYCommunity/lbry-sdk
Merge pull request #602 from lbryio/fix-file-with-abandoned-claim
fix file_list for files with abandoned claims
This commit is contained in:
commit
0ff308e3eb
3 changed files with 10 additions and 11 deletions
|
@ -21,7 +21,7 @@ at anytime.
|
|||
### Fixed
|
||||
* `file_list` for files with bad signatures
|
||||
* return None from resolve commands when nothing is found
|
||||
*
|
||||
* return lbry files with claims that are abandoned
|
||||
|
||||
## [0.9.2rc9] - 2017-04-08
|
||||
### Added
|
||||
|
|
|
@ -454,6 +454,9 @@ class Wallet(object):
|
|||
@defer.inlineCallbacks
|
||||
def get_claim(self, claim_id):
|
||||
claim = yield self._get_claim_by_claimid(claim_id)
|
||||
if not claim:
|
||||
log.warning("Claim does not exist: %s", claim_id)
|
||||
defer.returnValue(None)
|
||||
try:
|
||||
decoded = smart_decode(claim['value'])
|
||||
claim['value'] = decoded.claim_dict
|
||||
|
|
|
@ -909,19 +909,15 @@ class Daemon(AuthJSONRPCServer):
|
|||
size = None
|
||||
message = None
|
||||
|
||||
if lbry_file.claim_id:
|
||||
claim = yield self.session.wallet.get_claim(lbry_file.claim_id)
|
||||
else:
|
||||
claim = yield self.session.wallet.get_claim_info(lbry_file.name,
|
||||
lbry_file.txid,
|
||||
lbry_file.nout)
|
||||
try:
|
||||
|
||||
if claim and 'value' in claim:
|
||||
metadata = claim['value']
|
||||
except:
|
||||
else:
|
||||
metadata = None
|
||||
try:
|
||||
if lbry_file.txid and lbry_file.nout is not None:
|
||||
outpoint = repr(ClaimOutpoint(lbry_file.txid, lbry_file.nout))
|
||||
except TypeError:
|
||||
else:
|
||||
outpoint = None
|
||||
|
||||
if claim and 'has_signature' in claim:
|
||||
|
|
Loading…
Reference in a new issue