1

I am running two bitcoin instances using the method described in this previous thread: https://bitcoin.stackexchange.com/a/13584/6024

I have set the new datadir and each instance has a different wallet.

However, I found that I can't use the same port to listen on, otherwise there is a conflict. If I change the port for the second daemon, it receives no peers and cannot update the blockchain database.

How can I solve this issue?

1

You'll want to add either addnode=<ipaddress> or connect=<ipaddress> to the bitcoin.conf of the node that is not working, where <ipaddress> equals the 127.0.0.1

These can also be command line flags (e.g., bitcoind -connect=127.0.0.1).

The difference between addnode and connect is explained like this (attributed to 'Noodle' on Freenode):

Quick Primer on addnode vs connect

Let's say for instance you use addnode=4.2.2.4 addnode will connect you to and tell you about the nodes connected to 4.2.2.4. In addition it will tellthe other nodes connected to it that you exist so they can connect to you.
connect will not do the above when you 'connect' to it. It will only connect you to 4.2.2.4 and no one else
So if you're behind a firewall, or have other problems finding nodes, add some using 'addnode'.
If you want to stay private, use 'connect' to only connect to "trusted" nodes.
If you run multiple nodes on a LAN, there's no need for all of them to open lots of connections. Instead 'connect' them all to one node that is port forwarded and has lots of connections.

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.