Merge pull request #2431 from jgarzik/gen-bitcoins-init

Move GenerateBitcoins() call out of net.cpp's StartNode()
This commit is contained in:
Gavin Andresen 2013-04-02 08:56:57 -07:00
commit 06db61f09e
2 changed files with 3 additions and 3 deletions

View file

@ -1027,6 +1027,9 @@ bool AppInit2()
if (fServer) if (fServer)
NewThread(ThreadRPCServer, NULL); NewThread(ThreadRPCServer, NULL);
// Generate coins in the background
GenerateBitcoins(GetBoolArg("-gen", false), pwalletMain);
// ********************************************************* Step 12: finished // ********************************************************* Step 12: finished
uiInterface.InitMessage(_("Done loading")); uiInterface.InitMessage(_("Done loading"));

View file

@ -2047,9 +2047,6 @@ void StartNode(void* parg)
// Dump network addresses // Dump network addresses
if (!NewThread(ThreadDumpAddress, NULL)) if (!NewThread(ThreadDumpAddress, NULL))
printf("Error; NewThread(ThreadDumpAddress) failed\n"); printf("Error; NewThread(ThreadDumpAddress) failed\n");
// Generate coins in the background
GenerateBitcoins(GetBoolArg("-gen", false), pwalletMain);
} }
bool StopNode() bool StopNode()