Author

Topic: How to add a node in regtest mode via GUI? (Read 117 times)

legendary
Activity: 2534
Merit: 6080
Self-proclaimed Genius
September 19, 2022, 07:27:10 AM
#4
I am in the regtest mode via the GUI of bitcoincore. How can I add here an extra node so I am able to send him a fresh mined block and check if he receives it?
Any help here to solve this issue ?
I have a working setup of 3 Bitcoin-qt (GUI) Regtest in the same machine, I start them separately using these command line options:
Node1:
Code:
bitcoin-qt --regtest --port=8330 --datadir="E:\AppData\Bitcoin-altdir1
Node2:
Code:
bitcoin-qt --regtest --connect=127.0.0.1:8330 --datadir="E:\AppData\Bitcoin-altdir2
Node3:
Code:
bitcoin-qt --regtest --connect=127.0.0.1:8330 --datadir="E:\AppData\Bitcoin-altdir3

Basically, the three regtest nodes should have different data directories (existing directory) and using the same port.
Second, third and additional nodes have to be set to connect to localhost.
legendary
Activity: 1568
Merit: 6660
bitcoincleanup.com / bitmixlist.org
September 19, 2022, 05:28:46 AM
#3
AFAIK, there is currently no way to send RPC calls from the GUI. So it is only possible using a terminal and bitcoin-cli.

Assuming you have two different regtest nodes running on the same machine (it will suffice to give them different P2P ports, RPC ports, and data dirs), all you have to do, is connect the second node to the first one using bitcoin-cli addnode:

Code:
bitcoin-cli --port=xxxx --rpcport=yyyy addnode aaa.bbb.ccc.ddd

Replace aaa.bbb.ccc.ddd with the IP address of the second node, and the (p2p) port and RPC port respectively.
legendary
Activity: 2170
Merit: 1789
September 19, 2022, 04:55:33 AM
#2
If you want to test sending some coins to others, wouldn't testnet be preferable? AFAIK regtest is a local network and you can just create a new address to generate new coins to see whether a block is created successfully or not and so on. If you want to connect two clients to it, maybe run one in a sandbox while others run normally. I'm also a newbie on this stuff by the way, so wait for others to give you some tips. CMIIW.

This might help you: https://bitcointalksearch.org/topic/how-to-use-regtest-the-definitive-guide-5268794.
newbie
Activity: 14
Merit: 3
September 19, 2022, 04:23:28 AM
#1
Hi guys,

I am in the regtest mode via the GUI of bitcoincore. How can I add here an extra node so I am able to send him a fresh mined block and check if he receives it?
Any help here to solve this issue ?

Thanks.
Jump to: