Skip to content
This repository was archived by the owner on Apr 13, 2021. It is now read-only.

bitcoind: gracefully handle incorrect credentials #7

Open
Sjors opened this issue Jan 28, 2019 · 0 comments
Open

bitcoind: gracefully handle incorrect credentials #7

Sjors opened this issue Jan 28, 2019 · 0 comments

Comments

@Sjors
Copy link

Sjors commented Jan 28, 2019

I was treated to a crash and cryptic stack trace:

thread 'main' panicked at 'called `Result::unwrap()` on an `Err` value: Json(unexpected eof)', src/libcore/result.rs:1009:5
stack backtrace:

The bitcoind debug log explained what's going on:

2019-01-28T11:44:58Z ThreadRPCServer incorrect password attempt from 127.0.0.1:54517

When catching this error, it's helpful to add an additional debug line saying Using rpcuser <RPCUSER> and rpcpassword=**** from <DATADIR>/rbf.conf, so the user knows they didn't put the configuration in the wrong place.

It may also be helpful to add a testbitcoinrpc command, which could also check if a wallet and transaction index are present (by calling getrawtransaction on something really old).

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant