From f37b23b2a744f3fbbf10cb4ad76f7959c8676f3f Mon Sep 17 00:00:00 2001 From: ThomasV Date: Sun, 2 Mar 2014 11:02:45 +0100 Subject: [PATCH] rename command: getutxoaddress --- lib/commands.py | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/lib/commands.py b/lib/commands.py index 64f2c6916..c83f5d9e6 100644 --- a/lib/commands.py +++ b/lib/commands.py @@ -100,7 +100,7 @@ register_command('encrypt', 2,-1, False, False, False, 'encrypt a m register_command('decrypt', 2,-1, False, False, False, 'decrypt a message with privkey','decrypt ') register_command('daemon', 1, 1, True, False, False, 'start/stop daemon') register_command('getproof', 1, 1, True, False, False, 'get merkle proof', 'getproof
') -register_command('getunspentaddress', 2, 2, True, False, False, 'get the address of an unspent','getunspentaddress ') +register_command('getutxoaddress', 2, 2, True, False, False, 'get the address of an unspent transaction output','getutxoaddress ') @@ -153,8 +153,10 @@ class Commands: return self.network.synchronous_get([ ('blockchain.address.listunspent',[addr]) ])[0] - def getunspentaddress(self, txid, num): - return self.network.synchronous_get([ ('blockchain.utxo.get_address',[txid, num]) ])[0] + def getutxoaddress(self, txid, num): + r = self.network.synchronous_get([ ('blockchain.utxo.get_address',[txid, num]) ]) + if r: + return {'address':r[0] } def createrawtransaction(self, inputs, outputs):