This implements an idea from sipa in #28722 (comment) to allow bitcoin-cli
to connect to the node via IPC instead of TCP, if the ENABLE_IPC cmake option is enabled and the node has been started with -ipcbind
.
This feature can be tested with:
0build/bin/bitcoin-node -regtest -ipcbind=unix -debug=ipc
1build/bin/bitcoin-cli -regtest -ipcconnect=unix -getinfo
The -ipconnect parameter can also be omitted, since this change also makes bitcoin-cli
prefer IPC over HTTP by default, and falling back to HTTP if an IPC connection can’t be established.
This PR is part of the process separation project.