0

This is what happens after I run this command bitcoind --regtest --printtoconsole, my guess is that it's something to do with bitcoin.conf

enter image description here

My bitcoin.conf file looks like this:

server=1
rpcuser=root
rpcpassword=password
rpcconnect=127.0.0.1
rpcport=8332

If you need more context, these are my other questions: trouble with bitcoin cli regtest and interacting with bitcoin over docker

  • I don't see anything wrong. – Pieter Wuille Apr 19 '17 at 15:33
  • but- I get this- bitcoin-cli -regtest getinfo error: couldn't connect to server: unknown (code -1) (make sure server is running and you are connecting to the correct RPC port) – smatthewenglish Apr 19 '17 at 15:33
  • Try removing the rpcconnect line. rpcconnect is an option to bitcoin-cli, not bitcoind. – Pieter Wuille Apr 19 '17 at 15:48
  • ah- I removed it but- same error :/ – smatthewenglish Apr 19 '17 at 15:49
  • In fact, you can delete your bitcoin.conf entirely. bitcoind will create its own password if you don't set one (cookie), and bitcoin-cli can find it. All the other options are default. So I suggest just delete bitcoin.conf, restart bitcoind, and then try again. – Pieter Wuille Apr 19 '17 at 15:52
0

just do this...

To use bitcoind and bitcoin-cli, you will need to add a RPC password to your bitcoin.conf file. Both programs will read from the same file if both run on the same system as the same user, so any long random password will work:

  rpcpassword=change_this_to_a_long_random_password

in the future I'll be sure to RTFM

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.