Skip to content

bitcoin.rpc.RawProxy, 443 as default port for HTTPS and more robust parsing of bitcoin.conf#37

Merged
petertodd merged 2 commits intopetertodd:masterfrom
gitmarek:rpctweaks
Jan 4, 2015
Merged

bitcoin.rpc.RawProxy, 443 as default port for HTTPS and more robust parsing of bitcoin.conf#37
petertodd merged 2 commits intopetertodd:masterfrom
gitmarek:rpctweaks

Conversation

@gitmarek
Copy link
Copy Markdown
Contributor

Two minor changes to bitcoin.rpc.RawProxy:
Do not assume that bitcoin.conf file specifies rpcuser.
Use port 443 as default for https RPC connections.

@petertodd
Copy link
Copy Markdown
Owner

Checked the Bitcoin Core code - a empty rpcuser is OK but an empty rpcpassword is not.

So lets change this pull-req to raise an exception if rpcpassword is empty, and allow rpcuser to be empty. (with a default of "")

Marek Miller added 2 commits January 3, 2015 13:51
Also remove unnecessary FIXME comment (fixed by 28518d2).
and raise an exception if rpcpassword is not specified.

Comment: You can make RPC calls to bitcoind when bitcoin.conf specifies
just rpcpassword and leaves user name empty.  The class bitcoin.rpc.RawProxy
creates keys of the internal dictionary: conf = {}, based on the entries
in the configuration file.  Then  assumes that the rpcuser key exists and
uses it to create service_url.  This results in an error
when bitcoin.conf contains only rcppassword field and the following code
is executed:
>    proxy = bitcoin.rpc.RawProxy()
@gitmarek
Copy link
Copy Markdown
Contributor Author

gitmarek commented Jan 3, 2015

Followed your suggestions in ea73e3f. Also, changed order of the commits and rebased on master.

@petertodd petertodd merged commit ea73e3f into petertodd:master Jan 4, 2015
petertodd added a commit that referenced this pull request Jan 4, 2015
ea73e3f Do not assume that bitcoin.conf file specifies rpcuser (Marek Miller)
3d796d8 Use port 443 as default for https RPC connections (Marek Miller)
@gitmarek gitmarek deleted the rpctweaks branch January 5, 2015 17:06
ghtdak pushed a commit to ghtdak/python-bitcoinlib that referenced this pull request Dec 1, 2015
ea73e3f Do not assume that bitcoin.conf file specifies rpcuser (Marek Miller)
3d796d8 Use port 443 as default for https RPC connections (Marek Miller)

 [ yapified by gitreformat (github/ghtdak) on Mon Nov 30 21:11:44 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.

2 participants