bitcoind changes to stop storing settings in wallet.dat.

This commit is contained in:
Gavin Andresen
2012-02-16 15:00:16 -05:00
committed by Pieter Wuille
parent 4a10d4c6dc
commit 972060ce0e
7 changed files with 34 additions and 104 deletions

View File

@@ -43,6 +43,7 @@ bool OpenNetworkConnection(const CAddress& addrConnect);
//
bool fClient = false;
bool fAllowDNS = false;
static bool fUseUPnP = false;
uint64 nLocalServices = (fClient ? 0 : NODE_NETWORK);
CAddress addrLocalHost(CService("0.0.0.0", 0), nLocalServices);
static CNode* pnodeLocalHost = NULL;
@@ -1102,7 +1103,6 @@ void MapPort(bool fMapPort)
if (fUseUPnP != fMapPort)
{
fUseUPnP = fMapPort;
WriteSetting("fUseUPnP", fUseUPnP);
}
if (fUseUPnP && vnThreadsRunning[THREAD_UPNP] < 1)
{
@@ -1711,6 +1711,14 @@ bool BindListenPort(string& strError)
void StartNode(void* parg)
{
#ifdef USE_UPNP
#if USE_UPNP
fUseUPnP = GetBoolArg("-upnp", true);
#else
fUseUPnP = GetBoolArg("-upnp", false);
#endif
#endif
if (pnodeLocalHost == NULL)
pnodeLocalHost = new CNode(INVALID_SOCKET, CAddress(CService("127.0.0.1", 0), nLocalServices));
@@ -1812,7 +1820,7 @@ void StartNode(void* parg)
printf("Error: CreateThread(ThreadMessageHandler) failed\n");
// Generate coins in the background
GenerateBitcoins(fGenerateBitcoins, pwalletMain);
GenerateBitcoins(GetBoolArg("-gen", false), pwalletMain);
}
bool StopNode()