fix claim_show
This commit is contained in:
parent
89b4487eb9
commit
fa49b40389
3 changed files with 4 additions and 6 deletions
|
@ -18,6 +18,7 @@ at anytime.
|
|||
* issue where an `AuthAPIClient` (used by `lbrynet-cli`) would fail to update its session secret and keep making new auth sessions, with every other request failing
|
||||
* `use_auth_http` in a config file being overridden by the default command line argument to `lbrynet-daemon`, now the command line value will only override the config file value if it is provided
|
||||
* `lbrynet-cli` not automatically switching to the authenticated client if the server is detected to be using authentication. This resulted in `lbrynet-cli` failing to run when `lbrynet-daemon` was run with the `--http-auth` flag
|
||||
* fixed error when using `claim_show` with `txid` and `nout` arguments
|
||||
|
||||
### Deprecated
|
||||
*
|
||||
|
|
|
@ -446,14 +446,12 @@ class Wallet(object):
|
|||
defer.returnValue(claims)
|
||||
|
||||
@defer.inlineCallbacks
|
||||
def get_claim_by_outpoint(self, claim_outpoint, check_expire=True):
|
||||
txid, nout = claim_outpoint.split(":")
|
||||
nout = int(nout)
|
||||
def get_claim_by_outpoint(self, txid, nout, check_expire=True):
|
||||
claim = yield self._get_claim_by_outpoint(txid, nout)
|
||||
try:
|
||||
result = self._handle_claim_result(claim)
|
||||
yield self.save_claim(result)
|
||||
except (UnknownOutpoint) as err:
|
||||
except UnknownOutpoint as err:
|
||||
result = {'error': err.message}
|
||||
defer.returnValue(result)
|
||||
|
||||
|
|
|
@ -1488,8 +1488,7 @@ class Daemon(AuthJSONRPCServer):
|
|||
if claim_id is not None and txid is None and nout is None:
|
||||
claim_results = yield self.session.wallet.get_claim_by_claim_id(claim_id)
|
||||
elif txid is not None and nout is not None and claim_id is None:
|
||||
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(txid, int(nout))
|
||||
else:
|
||||
raise Exception("Must specify either txid/nout, or claim_id")
|
||||
response = yield self._render_response(claim_results)
|
||||
|
|
Loading…
Reference in a new issue