Several problems connecting and disconnecting to peers in Bitcoin Core GUI regtest mode

Several problems connecting and disconnecting to peers in Bitcoin Core GUI regtest mode

I'm trying to set up a private Bitcoin network using Bitcoin Core in regtest mode.

I create two folders, alice and bob. I then launch the GUI from the OSX Terminal:

# start Alice node
$ open -n /Applications/Bitcoin-Qt.app --args -regtest -datadir=/Users/{username}/Desktop/alice/ -port=18444

# start Bob node
$ open -n /Applications/Bitcoin-Qt.app --args -regtest -datadir=/Users/{username}/Desktop/bob/ -port=18445

From Alice's Console, I do:

addnode 127.0.0;1:18445 add

This creates a connection to both nodes.

I want to disconnect both nodes from each other.

From Alice's Console, I use:

addnode 127.0.0.1:18445 remove

On Alice's node, the peer is:

127.0.0.1:18445

However, on Bob's node, the peer is

127.0.0.1:57594

but I expect it to be:

127.0.0.1:18444

I try to remove Bob's node from Alice with:

addnode 127.0.0.1:18445 remove

Console returns null but doesn't remove the node.

When I try this from Alice's node:

addnode 127.0.0.1:57549 remove

I get Error: Node has not been added. (code -24)

I then try to disconnect Bob's node from Alice's node using the the Peers tab. Right click on peer (Bob) and choose disconnect.

The node is disconnected for about 45 seconds, then reconnects.

To summarize, I have two questions:

  1. Why doesn't the port number on Bob's node match the port number I gave it?
  2. How can I keep regtest nodes permanently disconnected for arbitrary periods of time and then reconnect them?
http://ift.tt/2zbn5c1

Comments

Popular posts from this blog

Antminer D3 Blissz Modified Firmware For Improved Performance

ETH To The Moon / Bank of England Cryptocurrency? / BTC Dominance / More (The Crypt0 Minute)