Skip to content

Conversation

@bitstein
Copy link
Contributor

@bitstein bitstein commented May 5, 2015

Because the importaddress RPC call requires having something in the label parameter in order to check the rescan parameter, I changed the default value of label to an empty string. The code now sends an RPC call with all of the parameters every time, such that all cases are handled properly.

Alternatively, the default value can remain None, but this would require if-else spaghetti.

@petertodd petertodd merged commit 9093b64 into petertodd:master May 23, 2015
petertodd added a commit that referenced this pull request May 23, 2015
9093b64 Update importaddress rpc call to handle no label, rescan=False (Michael Goldstein)
@patrick7kelly
Copy link

I can set the label to an empty string, but rescan seems to run regardless of whether I set it to True or False.

@petertodd
Copy link
Owner

@patrick7kelly What version of Bitcoin Core are you using?

I just tried reproducing this on v0.11.x - git HEAD - and it seems to work as expected. Also, if you could reply with exactly what lines of code you used that'd be great.

@patrick7kelly
Copy link

Using Bitcoin-core 0.10.2
rpc = Proxy()
rpc.importaddress(o.btc_address, '', False)

It's worth noting that I don't have an issue when using rpc._call('importaddress', o.btc_address, '', False)

ghtdak pushed a commit to ghtdak/python-bitcoinlib that referenced this pull request Dec 1, 2015
9093b64 Update importaddress rpc call to handle no label, rescan=False (Michael Goldstein)

 [ yapified by gitreformat (github/ghtdak) on Mon Nov 30 21:12:13 2015 ]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants