1

I'm trying to set up a test network consisting of 3 nodes, each with different bitcoin.conf. I've constructed the directory and the .conf-files similar to what is the state of the art in qa/pull-tester/. Within the terminal inside the node-A-directory I commanded: ...

bitcoind -conf="/home/me/.bitcoin/regtest/testnetwork/A/bitcoin.conf"

...and got back this error:

'Error initializing block database. Do you want to rebuild the block database now?'

My bitcoin.conf has following content:

regtest=1
rpcuser=rt //adopted from .conf-files in qa/pull-tester/
rpcpassword=rt //adopted from .conf-files in qa/pull-tester/
port=11111 //arbitrary free port
rpcport=21111 //arbitrary free port

Could someone please help with my intended network setup or at least say what I'm doing wrong?

PS: I'm going to paste my logfile in a comment below.

  • logfile: pastebin.com/aq4XpBNG – Aliakbar Ahmadi Mar 2 '15 at 16:21
  • Are you using different datadir's? Does the problem only occur when you run multiple instances? – Nick ODell Mar 2 '15 at 17:10
  • Actually the error is given at trying to start the first node - in my case node A. I solved the problem by adding -regtest, -daemon and -datadir="path to node directory" to my previous command ... but after trying to getbalance another error appeared saying "couldn't connect to server." – Aliakbar Ahmadi Mar 2 '15 at 17:11
  • Are you providing the same -conf option to bitcoin-cli? – Nick ODell Mar 2 '15 at 19:03
  • No I just do: 'bitcoin-cli regtest getbalance' ... Do I need to give -conf as parameter for every and each API command? Or did I just misunderstand your question? – Aliakbar Ahmadi Mar 2 '15 at 21:13
0

As the question is already answered in the comments and there anothere question arouse about how to send API commands independently to the server from each node.

As Nick ODell gave a correct hint, in fact you need to prefix each API command like "getbalance" with "bitcoin-cli -conf="!

Thanks to Nick ODell!

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.