commands: fix gettransaction
This commit is contained in:
@@ -567,9 +567,10 @@ class Commands:
|
|||||||
@command('n')
|
@command('n')
|
||||||
def gettransaction(self, txid):
|
def gettransaction(self, txid):
|
||||||
"""Retrieve a transaction. """
|
"""Retrieve a transaction. """
|
||||||
if self.wallet and txid in self.wallet.transactions:
|
tx = None
|
||||||
tx = self.wallet.transactions[txid]
|
if self.wallet:
|
||||||
else:
|
tx = self.wallet.db.get_transaction(txid)
|
||||||
|
if tx is None:
|
||||||
raw = self.network.run_from_another_thread(self.network.get_transaction(txid))
|
raw = self.network.run_from_another_thread(self.network.get_transaction(txid))
|
||||||
if raw:
|
if raw:
|
||||||
tx = Transaction(raw)
|
tx = Transaction(raw)
|
||||||
|
|||||||
Reference in New Issue
Block a user