mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-14 12:43:40 +02:00
fix -datadir=./subdir relative path,
autostart off by default except on windows, fix occasional "vector iterator not dereferencable" assertion with msvc, fix readlink compile warning on linux build, use sys/param.h and BSD define instead of __BSD__, -paytxfee switch git-svn-id: https://bitcoin.svn.sourceforge.net/svnroot/bitcoin/trunk@130 1a98c847-1fd6-4fd8-948a-caf3550aa51b
This commit is contained in:
parent
4287732797
commit
01cd2fdaf3
20 changed files with 132 additions and 39 deletions
16
init.cpp
16
init.cpp
|
|
@ -137,7 +137,10 @@ bool AppInit2(int argc, char* argv[])
|
|||
ParseParameters(argc, argv);
|
||||
|
||||
if (mapArgs.count("-datadir"))
|
||||
strlcpy(pszSetDataDir, mapArgs["-datadir"].c_str(), sizeof(pszSetDataDir));
|
||||
{
|
||||
filesystem::path pathDataDir = filesystem::system_complete(mapArgs["-datadir"]);
|
||||
strlcpy(pszSetDataDir, pathDataDir.string().c_str(), sizeof(pszSetDataDir));
|
||||
}
|
||||
|
||||
ReadConfigFile(mapArgs, mapMultiArgs); // Must be done after processing datadir
|
||||
|
||||
|
|
@ -363,6 +366,15 @@ bool AppInit2(int argc, char* argv[])
|
|||
}
|
||||
}
|
||||
|
||||
if (mapArgs.count("-paytxfee"))
|
||||
{
|
||||
if (!ParseMoney(mapArgs["-paytxfee"], nTransactionFee))
|
||||
{
|
||||
wxMessageBox(_("Invalid amount for -paytxfee=<amount>"), "Bitcoin");
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
//
|
||||
// Create the main window and start the node
|
||||
//
|
||||
|
|
@ -382,7 +394,7 @@ bool AppInit2(int argc, char* argv[])
|
|||
if (mapArgs.count("-server") || fDaemon)
|
||||
CreateThread(ThreadRPCServer, NULL);
|
||||
|
||||
#ifdef GUI
|
||||
#if defined(__WXMSW__) && defined(GUI)
|
||||
if (fFirstRun)
|
||||
SetStartOnSystemStartup(true);
|
||||
#endif
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue