Auto merge of #907 - DoNotUseThisCodeJUSTFORKS:t844-rename-bitcoin-conf, r=defuse
Rename bitcoin.conf and bitcoind.pid This leaves the mentions of those files in `doc/` and `contrib/` unchanged. **FORCE PUSHED**
This commit is contained in:
commit
87485d5ff3
|
@ -63,7 +63,7 @@ def initialize_datadir(dirname, n):
|
|||
datadir = os.path.join(dirname, "node"+str(n))
|
||||
if not os.path.isdir(datadir):
|
||||
os.makedirs(datadir)
|
||||
with open(os.path.join(datadir, "bitcoin.conf"), 'w') as f:
|
||||
with open(os.path.join(datadir, "zcash.conf"), 'w') as f:
|
||||
f.write("regtest=1\n");
|
||||
f.write("rpcuser=rt\n");
|
||||
f.write("rpcpassword=rt\n");
|
||||
|
@ -130,7 +130,7 @@ def initialize_chain(test_dir):
|
|||
from_dir = os.path.join("cache", "node"+str(i))
|
||||
to_dir = os.path.join(test_dir, "node"+str(i))
|
||||
shutil.copytree(from_dir, to_dir)
|
||||
initialize_datadir(test_dir, i) # Overwrite port/rpcport in bitcoin.conf
|
||||
initialize_datadir(test_dir, i) # Overwrite port/rpcport in zcash.conf
|
||||
|
||||
def initialize_chain_clean(test_dir, num_nodes):
|
||||
"""
|
||||
|
|
|
@ -20,7 +20,7 @@ std::string HelpMessageCli()
|
|||
string strUsage;
|
||||
strUsage += HelpMessageGroup(_("Options:"));
|
||||
strUsage += HelpMessageOpt("-?", _("This help message"));
|
||||
strUsage += HelpMessageOpt("-conf=<file>", strprintf(_("Specify configuration file (default: %s)"), "bitcoin.conf"));
|
||||
strUsage += HelpMessageOpt("-conf=<file>", strprintf(_("Specify configuration file (default: %s)"), "zcash.conf"));
|
||||
strUsage += HelpMessageOpt("-datadir=<dir>", _("Specify data directory"));
|
||||
strUsage += HelpMessageOpt("-testnet", _("Use the test network"));
|
||||
strUsage += HelpMessageOpt("-regtest", _("Enter regression test mode, which uses a special chain in which blocks can be "
|
||||
|
|
|
@ -63,7 +63,7 @@ bool AppInit(int argc, char* argv[])
|
|||
//
|
||||
// Parameters
|
||||
//
|
||||
// If Qt is used, parameters/bitcoin.conf are parsed in qt/bitcoin.cpp's main()
|
||||
// If Qt is used, parameters/zcash.conf are parsed in qt/bitcoin.cpp's main()
|
||||
ParseParameters(argc, argv);
|
||||
|
||||
// Process help and version before taking care about datadir
|
||||
|
|
|
@ -277,7 +277,7 @@ std::string HelpMessage(HelpMessageMode mode)
|
|||
strUsage += HelpMessageOpt("-blocknotify=<cmd>", _("Execute command when the best block changes (%s in cmd is replaced by block hash)"));
|
||||
strUsage += HelpMessageOpt("-checkblocks=<n>", strprintf(_("How many blocks to check at startup (default: %u, 0 = all)"), 288));
|
||||
strUsage += HelpMessageOpt("-checklevel=<n>", strprintf(_("How thorough the block verification of -checkblocks is (0-4, default: %u)"), 3));
|
||||
strUsage += HelpMessageOpt("-conf=<file>", strprintf(_("Specify configuration file (default: %s)"), "bitcoin.conf"));
|
||||
strUsage += HelpMessageOpt("-conf=<file>", strprintf(_("Specify configuration file (default: %s)"), "zcash.conf"));
|
||||
if (mode == HMM_BITCOIND)
|
||||
{
|
||||
#if !defined(WIN32)
|
||||
|
@ -291,7 +291,7 @@ std::string HelpMessage(HelpMessageMode mode)
|
|||
strUsage += HelpMessageOpt("-par=<n>", strprintf(_("Set the number of script verification threads (%u to %d, 0 = auto, <0 = leave that many cores free, default: %d)"),
|
||||
-(int)boost::thread::hardware_concurrency(), MAX_SCRIPTCHECK_THREADS, DEFAULT_SCRIPTCHECK_THREADS));
|
||||
#ifndef WIN32
|
||||
strUsage += HelpMessageOpt("-pid=<file>", strprintf(_("Specify pid file (default: %s)"), "bitcoind.pid"));
|
||||
strUsage += HelpMessageOpt("-pid=<file>", strprintf(_("Specify pid file (default: %s)"), "zcashd.pid"));
|
||||
#endif
|
||||
strUsage += HelpMessageOpt("-prune=<n>", strprintf(_("Reduce storage requirements by pruning (deleting) old blocks. This mode disables wallet support and is incompatible with -txindex. "
|
||||
"Warning: Reverting this setting requires re-downloading the entire blockchain. "
|
||||
|
|
|
@ -559,7 +559,7 @@ int main(int argc, char *argv[])
|
|||
// User language is set up: pick a data directory
|
||||
Intro::pickDataDirectory();
|
||||
|
||||
/// 6. Determine availability of data directory and parse bitcoin.conf
|
||||
/// 6. Determine availability of data directory and parse zcash.conf
|
||||
/// - Do not call GetDataDir(true) before this step finishes
|
||||
if (!boost::filesystem::is_directory(GetDataDir(false)))
|
||||
{
|
||||
|
|
|
@ -191,7 +191,7 @@ void Intro::pickDataDirectory()
|
|||
settings.setValue("strDataDir", dataDir);
|
||||
}
|
||||
/* Only override -datadir if different from the default, to make it possible to
|
||||
* override -datadir in the bitcoin.conf file in the default data directory
|
||||
* override -datadir in the zcash.conf file in the default data directory
|
||||
* (to be consistent with bitcoind behavior)
|
||||
*/
|
||||
if(dataDir != getDefaultDataDirectory())
|
||||
|
|
|
@ -102,7 +102,7 @@ Value getgenerate(const Array& params, bool fHelp)
|
|||
throw runtime_error(
|
||||
"getgenerate\n"
|
||||
"\nReturn if the server is set to generate coins or not. The default is false.\n"
|
||||
"It is set with the command line argument -gen (or bitcoin.conf setting gen)\n"
|
||||
"It is set with the command line argument -gen (or zcash.conf setting gen)\n"
|
||||
"It can also be set with the setgenerate call.\n"
|
||||
"\nResult\n"
|
||||
"true|false (boolean) If the server is set to generate coins or not\n"
|
||||
|
|
|
@ -521,7 +521,7 @@ void ClearDatadirCache()
|
|||
|
||||
boost::filesystem::path GetConfigFile()
|
||||
{
|
||||
boost::filesystem::path pathConfigFile(GetArg("-conf", "bitcoin.conf"));
|
||||
boost::filesystem::path pathConfigFile(GetArg("-conf", "zcash.conf"));
|
||||
if (!pathConfigFile.is_complete())
|
||||
pathConfigFile = GetDataDir(false) / pathConfigFile;
|
||||
|
||||
|
@ -533,14 +533,14 @@ void ReadConfigFile(map<string, string>& mapSettingsRet,
|
|||
{
|
||||
boost::filesystem::ifstream streamConfig(GetConfigFile());
|
||||
if (!streamConfig.good())
|
||||
return; // No bitcoin.conf file is OK
|
||||
return; // No zcash.conf file is OK
|
||||
|
||||
set<string> setOptions;
|
||||
setOptions.insert("*");
|
||||
|
||||
for (boost::program_options::detail::config_file_iterator it(streamConfig, setOptions), end; it != end; ++it)
|
||||
{
|
||||
// Don't overwrite existing settings so command line settings override bitcoin.conf
|
||||
// Don't overwrite existing settings so command line settings override zcash.conf
|
||||
string strKey = string("-") + it->string_key;
|
||||
if (mapSettingsRet.count(strKey) == 0)
|
||||
{
|
||||
|
@ -557,7 +557,7 @@ void ReadConfigFile(map<string, string>& mapSettingsRet,
|
|||
#ifndef WIN32
|
||||
boost::filesystem::path GetPidFile()
|
||||
{
|
||||
boost::filesystem::path pathPidFile(GetArg("-pid", "bitcoind.pid"));
|
||||
boost::filesystem::path pathPidFile(GetArg("-pid", "zcashd.pid"));
|
||||
if (!pathPidFile.is_complete()) pathPidFile = GetDataDir() / pathPidFile;
|
||||
return pathPidFile;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue