mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-01-18 22:35:39 +01:00
bitcoind changes to stop storing settings in wallet.dat.
This commit is contained in:
committed by
Pieter Wuille
parent
4a10d4c6dc
commit
972060ce0e
30
src/main.cpp
30
src/main.cpp
@@ -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);
|
||||
|
||||
Reference in New Issue
Block a user