From 969c4c2194d23aad915df2fdd3e142c2cd7997d8 Mon Sep 17 00:00:00 2001 From: ThomasV Date: Mon, 13 Jan 2014 21:27:31 +0100 Subject: [PATCH] fix for getrawtransaction --- lib/commands.py | 14 +++++++------- 1 files changed, 7 insertions(+), 7 deletions(-) diff --git a/lib/commands.py b/lib/commands.py index ccaa038..ef04fe0 100644 --- a/lib/commands.py +++ b/lib/commands.py @@ -72,7 +72,7 @@ register_command('getaddressbalance', 1, 1, True, True, False, 'Return the register_command('getaddresshistory', 1, 1, True, True, False, 'Return the transaction history of a wallet address', 'getaddresshistory
') register_command('getconfig', 1, 1, False, False, False, 'Return a configuration variable', 'getconfig ') register_command('getpubkeys', 1, 1, False, True, False, 'Return the public keys for a wallet address', 'getpubkeys ') -register_command('getrawtransaction', 1, 2, True, False, False, 'Retrieve a transaction', 'getrawtransaction ') +register_command('getrawtransaction', 1, 1, True, False, False, 'Retrieve a transaction', 'getrawtransaction ') register_command('getseed', 0, 0, False, True, True, 'Print the generation seed of your wallet.') register_command('getmpk', 0, 0, False, True, False, 'Return your wallet\'s master public key', 'getmpk') register_command('help', 0, 1, False, False, False, 'Prints this help') @@ -350,11 +350,11 @@ class Commands: if cmd.options: print_msg("options:\n" + cmd.options) return None - def getrawtransaction(self, tx_hash, height = 0): - tx = self.wallet.transactions.get(tx_hash) - if tx: - return tx - height = int(height) - return self.network.retrieve_transaction(tx_hash, height) + def getrawtransaction(self, tx_hash): + if self.wallet: + tx = self.wallet.transactions.get(tx_hash) + if tx: + return tx + return self.network.retrieve_transaction(tx_hash) -- 1.7.1