tgettransaction command: require network instead of wallet - electrum - Electrum Bitcoin wallet HTML git clone https://git.parazyd.org/electrum DIR Log DIR Files DIR Refs DIR Submodules --- DIR commit 608568839e2bbcfddbb796cf9237c9c60978c486 DIR parent ac88ae9c7fa7e2612dfa62b492825248d4b16294 HTML Author: ThomasV <thomasv@electrum.org> Date: Sun, 12 Mar 2017 12:33:52 +0100 gettransaction command: require network instead of wallet Diffstat: M lib/commands.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) --- DIR diff --git a/lib/commands.py b/lib/commands.py t@@ -506,11 +506,12 @@ class Commands: out.append(item) return out - @command('w') + @command('n') def gettransaction(self, txid): """Retrieve a transaction. """ - tx = self.wallet.transactions.get(txid) if self.wallet else None - if tx is None and self.network: + if self.wallet and txid in self.wallet.transactions: + tx = self.wallet.transactions[txid] + else: raw = self.network.synchronous_get(('blockchain.transaction.get', [txid])) if raw: tx = Transaction(raw)