But it could be cooler to just have the config file to setup and not re write a long cli args to put each time.
So, it's not necessary but cool for the next ^^
In that case, you should put your bitcoin.conf file inside bitcoin's default data directory, set the datadir for mainnet and testnet and remove the conf files from the separate custom datadirs.
In MacOS, it should be in:
~/Library/Application Support/Bitcoin/bitcoin.confThat way, bitcoind will automatically load it without needing you to specify the paths. (
the GUI will still use the one set in the Welcome Screen though)
Or set the
--datadir in the command line arg for testnet and mainnet and remove the
--conf and
--walletdir args.
Then put a bitcoin.conf file for testnet (
still with [test]) and mainnet in those separate datadirs.
In both cases, you do not need to set blocksdir, walletsdir, settings lines in your bitcoin.conf file.
Because those aren't necessary if you intended to save the settings.json, blocks folder, wallets folder inside the datadir which is already done by default.
Also, you may consider fixing the paths in testnet (
if it's not intentional) because-
in testnet, it'll automatically create "
testnet3" directory in the specified 'blocksdir' and 'datadir'.
For example:
datadir=/Volumes/Crucial\ X8/bitcoin/Bitcoin/testnet3
blocksdir=/Volumes/Crucial\ X8/bitcoin/Bitcoin/testnet3/blocks
These configurations will result with this folder structure:
Folder where the datadir will be saved: "......./Bitcoin/testnet3/testnet3"
Folder where the blk and rev files will be stored: "......./Bitcoin/testnet3/blocks/testnet3/blocks"
If the intention is to save the block in the testnet3 directory and the datadir is set, you can remove it from the config/args.
Lastly, if the datadir is to be set in "
......./Bitcoin/testnet3", the datadir for testnet should be:
datadir=/Volumes/Crucial\ X8/bitcoin/Bitcoin