Skip to content

Commit a0cafb7

Browse files
Jeff GarzikJeff Garzik
Jeff Garzik
authored and
Jeff Garzik
committed
Move GenerateBitcoins() call out of net.cpp's StartNode()
The internal miner is closely bound to the wallet engine, not the blockchain engine.
1 parent 9d8d859 commit a0cafb7

File tree

2 files changed

+3
-3
lines changed

2 files changed

+3
-3
lines changed

src/init.cpp

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1027,6 +1027,9 @@ bool AppInit2()
10271027
if (fServer)
10281028
NewThread(ThreadRPCServer, NULL);
10291029

1030+
// Generate coins in the background
1031+
GenerateBitcoins(GetBoolArg("-gen", false), pwalletMain);
1032+
10301033
// ********************************************************* Step 12: finished
10311034

10321035
uiInterface.InitMessage(_("Done loading"));

src/net.cpp

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2047,9 +2047,6 @@ void StartNode(void* parg)
20472047
// Dump network addresses
20482048
if (!NewThread(ThreadDumpAddress, NULL))
20492049
printf("Error; NewThread(ThreadDumpAddress) failed\n");
2050-
2051-
// Generate coins in the background
2052-
GenerateBitcoins(GetBoolArg("-gen", false), pwalletMain);
20532050
}
20542051

20552052
bool StopNode()

0 commit comments

Comments
 (0)