rename Wallet.get_claim() to get_claim_by_claim_id()

This commit is contained in:
Kay Kurokawa 2017-06-23 12:03:01 -04:00
parent ab3278c50a
commit 21c1786dc6
2 changed files with 4 additions and 3 deletions

View file

@ -693,7 +693,7 @@ class Wallet(object):
defer.returnValue(results) defer.returnValue(results)
@defer.inlineCallbacks @defer.inlineCallbacks
def get_claim(self, claim_id, check_expire=True): def get_claim_by_claim_id(self, claim_id, check_expire=True):
cached_claim = yield self.get_cached_claim(claim_id, check_expire) cached_claim = yield self.get_cached_claim(claim_id, check_expire)
if cached_claim: if cached_claim:
result = cached_claim result = cached_claim

View file

@ -836,7 +836,8 @@ class Daemon(AuthJSONRPCServer):
size = None size = None
message = None message = None
claim = yield self.session.wallet.get_claim(lbry_file.claim_id, check_expire=False) claim = yield self.session.wallet.get_claim_by_claim_id(lbry_file.claim_id,
check_expire=False)
if claim and 'value' in claim: if claim and 'value' in claim:
metadata = claim['value'] metadata = claim['value']
@ -1343,7 +1344,7 @@ class Daemon(AuthJSONRPCServer):
""" """
try: try:
if claim_id: if claim_id:
claim_results = yield self.session.wallet.get_claim(claim_id) claim_results = yield self.session.wallet.get_claim_by_claim_id(claim_id)
elif txid and nout is not None: elif txid and nout is not None:
outpoint = ClaimOutpoint(txid, nout) outpoint = ClaimOutpoint(txid, nout)
claim_results = yield self.session.wallet.get_claim_by_outpoint(outpoint) claim_results = yield self.session.wallet.get_claim_by_outpoint(outpoint)