electrum

Electrum Bitcoin wallet
git clone https://git.parazyd.org/electrum
Log | Files | Refs | Submodules

commit 969c4c2194d23aad915df2fdd3e142c2cd7997d8
parent ca4756fba1480b2964d966040bd79b2767a795d1
Author: ThomasV <thomasv@gitorious>
Date:   Mon, 13 Jan 2014 21:27:31 +0100

fix for getrawtransaction

Diffstat:
Mlib/commands.py | 14+++++++-------
1 file changed, 7 insertions(+), 7 deletions(-)

diff --git 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 <address>') register_command('getconfig', 1, 1, False, False, False, 'Return a configuration variable', 'getconfig <name>') register_command('getpubkeys', 1, 1, False, True, False, 'Return the public keys for a wallet address', 'getpubkeys <bitcoin address>') -register_command('getrawtransaction', 1, 2, True, False, False, 'Retrieve a transaction', 'getrawtransaction <txhash> <height>') +register_command('getrawtransaction', 1, 1, True, False, False, 'Retrieve a transaction', 'getrawtransaction <txhash>') 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)