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

@@ -57,22 +57,12 @@ CScript COINBASE_FLAGS;
const string strMessageMagic = "Bitcoin Signed Message:\n";
double dHashesPerSec;
int64 nHPSTimerStart;
// Settings
int fGenerateBitcoins = false;
int64 nTransactionFee = 0;
int fLimitProcessors = false;
int nLimitProcessors = 1;
int fMinimizeToTray = true;
int fMinimizeOnClose = true;
#if USE_UPNP
int fUseUPnP = true;
#else
int fUseUPnP = false;
#endif
//////////////////////////////////////////////////////////////////////////////
@@ -3289,6 +3279,10 @@ bool CheckWork(CBlock* pblock, CWallet& wallet, CReserveKey& reservekey)
void static ThreadBitcoinMiner(void* parg);
static bool fGenerateBitcoins = false;
static bool fLimitProcessors = false;
static int nLimitProcessors = -1;
void static BitcoinMiner(CWallet *pwallet)
{
printf("BitcoinMiner started\n");
@@ -3464,13 +3458,13 @@ void static ThreadBitcoinMiner(void* parg)
void GenerateBitcoins(bool fGenerate, CWallet* pwallet)
{
if (fGenerateBitcoins != fGenerate)
{
fGenerateBitcoins = fGenerate;
WriteSetting("fGenerateBitcoins", fGenerateBitcoins);
MainFrameRepaint();
}
if (fGenerateBitcoins)
fGenerateBitcoins = fGenerate;
nLimitProcessors = GetArg("-genproclimit", -1);
if (nLimitProcessors == 0)
fGenerateBitcoins = false;
fLimitProcessors = (nLimitProcessors != -1);
if (fGenerate)
{
int nProcessors = boost::thread::hardware_concurrency();
printf("%d processors\n", nProcessors);