Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

default .conf #504

Merged
merged 1 commit into from
Jun 6, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions src/qt/intro.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -202,6 +202,8 @@ void Intro::pickDataDirectory()
boost::filesystem::detail::copy_file(GUIUtil::qstringToBoostPath(oldWallet),GUIUtil::qstringToBoostPath(dataDir + QDir::separator() + "wallet.dat"),boost::filesystem::detail::none);
SoftSetArg("-zapwallettxes","2");
}
makeDefaultConfF();

WriteConfigFile("addanonserver", "95.183.52.55:3000");
WriteConfigFile("addanonserver", "95.183.52.28:3000");
WriteConfigFile("addanonserver", "95.183.52.29:3000");
Expand All @@ -226,6 +228,64 @@ void Intro::pickDataDirectory()
SoftSetArg("-datadir", GUIUtil::qstringToBoostPath(dataDir).string()); // use OS locale for path setting
}

void Intro::makeDefaultConfF()
{
boost::filesystem::ifstream streamConfig(GetConfigFile());

if (streamConfig.good() == false)
{
char t[] = R"(##
## navcoin.conf configuration file. Lines beginning with # are comments.
##

# Network-related settings:

# Run on the test network instead of the real navcoin network.
#testnet=0

# Run a regression test network
#regtest=0

#
# JSON-RPC options (for controlling a running NavCoin/navcoind process)
#

# server=1 tells NavCoin-Qt and navcoind to accept JSON-RPC commands
#server=0

# You must set rpcuser and rpcpassword to secure the JSON-RPC api
#rpcuser=Ulysseys
#rpcpassword=YourSuperGreatPasswordNumber_DO_NOT_USE_THIS_OR_YOU_WILL_GET_ROBBED_385593

# By default, only RPC connections from localhost are allowed.

# server=1 tells NavCoin-Qt to accept JSON-RPC commands.
# it is also read by navcoind to determine if RPC should be enabled

# Listen for RPC connections on this TCP port:
# it's default port . turns on by below line.
#rpcport=44446

# Transaction Fee Changes in 0.10.0

# Create transactions that have enough fees (or priority) so they are likely to begin confirmation within n blocks (default: 1).
# This setting is over-ridden by the -paytxfee option.
#txconfirmtarget=n

# User interface options

# Start NavCoin minimized
#min=1

# Minimize to the system tray
#minimizetotray=1)";

boost::filesystem::ofstream outStream(GetConfigFile(), std::ios_base::app);
outStream << t ;
outStream.close();
}
}

void Intro::setStatus(int status, const QString &message, quint64 bytesAvailable)
{
switch(status)
Expand Down
1 change: 1 addition & 0 deletions src/qt/intro.h
Original file line number Diff line number Diff line change
Expand Up @@ -44,6 +44,7 @@ class Intro : public QDialog
* Determine default data directory for operating system.
*/
static QString getDefaultDataDirectory();
static void makeDefaultConfF();

Q_SIGNALS:
void requestCheck();
Expand Down