0

I just changed the system on which I'm running a node from a Mac to a Ubuntu Linux system. On the Ubuntu system the blockchain data is on a disk device different from the root disk containing my home directory. I copied the blockchain data of a couple of days ago from the Mac to the Ubuntu system. In /home/myUserName/.bitcoin/bitcoin.conf I set datadir=[path to data disk]. The other files in that directory seem what I'd expect virgin, pre-IBD, files to look like. I ran bitcoin-qt and it brought the blockchain up to date on the data disk.

Then I happened to notice that there is a home/myUserName/.config/Bitcoin/Bitcoin-Qt.conf file and it contains StrDataDir=/home/myUserName/.bitcoin, i.e., the default and now incorrect blockchain data location. Should I change that? Or maybe it's telling bitcoin-qt where the bitcoin.conf file is?

P.S.: can I delete the files in /home/myUserName/.bitcoin other than bitcoin.conf?

2

That Bitcoin-Qt.conf file is one generated by Qt and is used to store the settings that you can change through the Settings > Options window. This file should not be modified directly but rather through the Options window. Each of those settings have corresponding command line (and therefore bitcoin.conf) options. The settings specified in the bitcoin.conf override those stored by Qt in Bitcoin-Qt.conf, and the bitcoin.conf settings are overridden by the command line options. It is also important to note that the settings stored in Bitcoin-Qt.conf are only used by bitcoin-qt, bitcoind will not use those settings.

Since you have set the datadir in the bitcoin.conf, the value set in the Qt settings is not used. It is unnecessary to change them.

P.S.: can I delete the files in /home/myUserName/.bitcoin other than bitcoin.conf?

No, that can cause corruption. They are not useless files; Bitcoin Core uses them for its operation.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.