fix file_list for files with abandoned claims
This commit is contained in:
parent
978139a631
commit
9531bdf396
3 changed files with 10 additions and 11 deletions
|
@ -21,7 +21,7 @@ at anytime.
|
||||||
### Fixed
|
### Fixed
|
||||||
* `file_list` for files with bad signatures
|
* `file_list` for files with bad signatures
|
||||||
* return None from resolve commands when nothing is found
|
* return None from resolve commands when nothing is found
|
||||||
*
|
* return lbry files with claims that are abandoned
|
||||||
|
|
||||||
## [0.9.2rc9] - 2017-04-08
|
## [0.9.2rc9] - 2017-04-08
|
||||||
### Added
|
### Added
|
||||||
|
|
|
@ -454,6 +454,9 @@ class Wallet(object):
|
||||||
@defer.inlineCallbacks
|
@defer.inlineCallbacks
|
||||||
def get_claim(self, claim_id):
|
def get_claim(self, claim_id):
|
||||||
claim = yield self._get_claim_by_claimid(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:
|
try:
|
||||||
decoded = smart_decode(claim['value'])
|
decoded = smart_decode(claim['value'])
|
||||||
claim['value'] = decoded.claim_dict
|
claim['value'] = decoded.claim_dict
|
||||||
|
|
|
@ -909,19 +909,15 @@ class Daemon(AuthJSONRPCServer):
|
||||||
size = None
|
size = None
|
||||||
message = None
|
message = None
|
||||||
|
|
||||||
if lbry_file.claim_id:
|
claim = yield self.session.wallet.get_claim(lbry_file.claim_id)
|
||||||
claim = yield self.session.wallet.get_claim(lbry_file.claim_id)
|
|
||||||
else:
|
if claim and 'value' in claim:
|
||||||
claim = yield self.session.wallet.get_claim_info(lbry_file.name,
|
|
||||||
lbry_file.txid,
|
|
||||||
lbry_file.nout)
|
|
||||||
try:
|
|
||||||
metadata = claim['value']
|
metadata = claim['value']
|
||||||
except:
|
else:
|
||||||
metadata = None
|
metadata = None
|
||||||
try:
|
if lbry_file.txid and lbry_file.nout is not None:
|
||||||
outpoint = repr(ClaimOutpoint(lbry_file.txid, lbry_file.nout))
|
outpoint = repr(ClaimOutpoint(lbry_file.txid, lbry_file.nout))
|
||||||
except TypeError:
|
else:
|
||||||
outpoint = None
|
outpoint = None
|
||||||
|
|
||||||
if claim and 'has_signature' in claim:
|
if claim and 'has_signature' in claim:
|
||||||
|
|
Loading…
Reference in a new issue