From 9093b644398af76faeb665c211057b3a6d89370b Mon Sep 17 00:00:00 2001 From: Michael Goldstein Date: Tue, 5 May 2015 18:49:01 -0500 Subject: [PATCH] Update importaddress rpc call to handle no label, rescan=False --- bitcoin/rpc.py | 10 ++-------- 1 file changed, 2 insertions(+), 8 deletions(-) diff --git a/bitcoin/rpc.py b/bitcoin/rpc.py index a56258fe..08094cdb 100644 --- a/bitcoin/rpc.py +++ b/bitcoin/rpc.py @@ -388,17 +388,11 @@ def gettxout(self, outpoint, includemempool=True): r['bestblock'] = lx(r['bestblock']) return r - def importaddress(self, addr, label=None, rescan=True): + def importaddress(self, addr, label='', rescan=True): """Adds an address or pubkey to wallet without the associated privkey.""" addr = str(addr) - if label is not None: - if rescan: - r = self._call('importaddress', addr, label, True) - else: - r = self._call('importaddress', addr, label) - else: - r = self._call('importaddress', addr) + r = self._call('importaddress', addr, label, rescan) return r def listunspent(self, minconf=0, maxconf=9999999, addrs=None):