Skip to content

Commit 28485c7

Browse files
committed
Merge #10825: net: set regtest JSON-RPC port to 18443 to avoid conflict with testnet 18332
ce3baa1 changed regtest RPCport to 18443 to avoid conflict with testnet 18332 (Ferdinando M. Ametrano) Pull request description: using the same JSON-RPC default port for both testnet and regtest prevents running both at the same time on the same machine. Since RPCport=P2Pport-1 for both mainnet and testnet, and regtest P2Pport being 18444, 18443 is proposed for regtest RPCport Documentation has been updated (or created where missing); manpages doc/man/bitcoin*.1 could include information for regtest too Tree-SHA512: d42185f7ef54dc918ece19b543c8681d08bb9c5a971394e21f2d9a1091734b091b08df69fab622c207b46f402cf9323ded5b7a33fbd0af722388930169124e7f
2 parents a31e9ad + ce3baa1 commit 28485c7

File tree

4 files changed

+14
-2
lines changed

4 files changed

+14
-2
lines changed

contrib/linearize/example-linearize.cfg

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,16 @@ rpcuser=someuser
33
rpcpassword=somepassword
44
#datadir=~/.bitcoin
55
host=127.0.0.1
6+
7+
#mainnet default
68
port=8332
9+
10+
#testnet default
711
#port=18332
812

13+
#regtest default
14+
#port=18443
15+
916
# bootstrap.dat hashlist settings (linearize-hashes)
1017
max_height=313000
1118

contrib/rpm/bitcoin.spec

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -336,6 +336,8 @@ done
336336
%{_sbindir}/semanage port -a -t bitcoin_port_t -p tcp 8333
337337
%{_sbindir}/semanage port -a -t bitcoin_port_t -p tcp 18332
338338
%{_sbindir}/semanage port -a -t bitcoin_port_t -p tcp 18333
339+
%{_sbindir}/semanage port -a -t bitcoin_port_t -p tcp 18443
340+
%{_sbindir}/semanage port -a -t bitcoin_port_t -p tcp 18444
339341
%{_sbindir}/fixfiles -R bitcoin-server restore &> /dev/null || :
340342
%{_sbindir}/restorecon -R %{_localstatedir}/lib/bitcoin || :
341343
fi
@@ -355,6 +357,8 @@ if [ $1 -eq 0 ]; then
355357
%{_sbindir}/semanage port -d -p tcp 8333
356358
%{_sbindir}/semanage port -d -p tcp 18332
357359
%{_sbindir}/semanage port -d -p tcp 18333
360+
%{_sbindir}/semanage port -d -p tcp 18443
361+
%{_sbindir}/semanage port -d -p tcp 18444
358362
for selinuxvariant in %{selinux_variants}; do
359363
%{_sbindir}/semodule -s ${selinuxvariant} -r bitcoin &> /dev/null || :
360364
done

doc/REST-interface.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,8 @@ Unauthenticated REST Interface
33

44
The REST API can be enabled with the `-rest` option.
55

6-
The interface runs on the same port as the JSON-RPC interface, by default port 8332 for mainnet and port 18332 for testnet.
6+
The interface runs on the same port as the JSON-RPC interface, by default port 8332 for mainnet, port 18332 for testnet,
7+
and port 18443 for regtest.
78

89
Supported API
910
-------------

src/chainparamsbase.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ class CBaseRegTestParams : public CBaseChainParams
5757
public:
5858
CBaseRegTestParams()
5959
{
60-
nRPCPort = 18332;
60+
nRPCPort = 18443;
6161
strDataDir = "regtest";
6262
}
6363
};

0 commit comments

Comments
 (0)