diff --git a/lbrynet/daemon/Daemon.py b/lbrynet/daemon/Daemon.py index 776ba67d1..dea8f65fe 100644 --- a/lbrynet/daemon/Daemon.py +++ b/lbrynet/daemon/Daemon.py @@ -381,14 +381,14 @@ class Daemon(AuthJSONRPCServer): self.analytics_manager.send_claim_action('publish') nout = 0 script = tx.outputs[nout].script - log.info("Success! Published to lbry://%s txid: %s nout: %d", name, tx.hex_id.decode(), nout) + log.info("Success! Published to lbry://%s txid: %s nout: %d", name, tx.id, nout) defer.returnValue({ "success": True, - "txid": tx.hex_id.decode(), + "txid": tx.id, "nout": nout, "tx": hexlify(tx.raw), "fee": str(Decimal(tx.fee) / COIN), - "claim_id": hexlify(tx.get_claim_id(0)), + "claim_id": hexlify(tx.get_claim_id(0)[::-1]), "value": hexlify(script.values['claim']), "claim_address": self.ledger.hash160_to_address(script.values['pubkey_hash']) }) diff --git a/lbrynet/daemon/Publisher.py b/lbrynet/daemon/Publisher.py index 3bd8d72e2..9456d7f23 100644 --- a/lbrynet/daemon/Publisher.py +++ b/lbrynet/daemon/Publisher.py @@ -1,6 +1,7 @@ import logging import mimetypes import os +from binascii import hexlify from twisted.internet import defer @@ -49,7 +50,7 @@ class Publisher(object): # check if we have a file already for this claim (if this is a publish update with a new stream) old_stream_hashes = yield self.storage.get_old_stream_hashes_for_claim_id( - tx.get_claim_id(0), self.lbry_file.stream_hash.decode() + hexlify(tx.get_claim_id(0)[::-1]), self.lbry_file.stream_hash ) if old_stream_hashes: for lbry_file in filter(lambda l: l.stream_hash in old_stream_hashes, @@ -58,7 +59,7 @@ class Publisher(object): log.info("Removed old stream for claim update: %s", lbry_file.stream_hash) yield self.storage.save_content_claim( - self.lbry_file.stream_hash.decode(), get_certificate_lookup(tx, 0) + self.lbry_file.stream_hash, get_certificate_lookup(tx, 0) ) defer.returnValue(tx) diff --git a/lbrynet/wallet/manager.py b/lbrynet/wallet/manager.py index d568dda21..b0cbb5ae7 100644 --- a/lbrynet/wallet/manager.py +++ b/lbrynet/wallet/manager.py @@ -176,12 +176,12 @@ class LbryWalletManager(BaseWalletManager): if isinstance(address, buffer): address = str(address) return { - "claim_id": hexlify(tx.get_claim_id(txo.index)).decode(), + "claim_id": hexlify(tx.get_claim_id(txo.position)).decode(), "name": name, "amount": bid, "address": address.decode(), - "txid": tx.hex_id.decode(), - "nout": txo.index, + "txid": tx.id.decode(), + "nout": txo.position, "value": claim_dict, "height": -1, "claim_sequence": -1,