Browse Source

Move GenerateBitcoins() call out of net.cpp's StartNode()

The internal miner is closely bound to the wallet engine,
not the blockchain engine.
miguelfreitas
Jeff Garzik 12 years ago committed by Jeff Garzik
parent
commit
a0cafb7945
  1. 3
      src/init.cpp
  2. 3
      src/net.cpp

3
src/init.cpp

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

3
src/net.cpp

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

Loading…
Cancel
Save