mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-13 12:33:42 +02:00
Move pMiningKey init out of StartRPCThreads
This commit decouples the pMiningKey initialization and shutdown from the RPC threads. `getwork` and `getblocktemplate` rely on pMiningKey, and can also be ran from the debug window in the UI even when the RPC server is not running. Solves issue #2706.
This commit is contained in:
parent
ba35ecc003
commit
d98bf10f23
4 changed files with 21 additions and 10 deletions
|
|
@ -96,6 +96,7 @@ void Shutdown()
|
|||
RenameThread("bitcoin-shutoff");
|
||||
nTransactionsUpdated++;
|
||||
StopRPCThreads();
|
||||
ShutdownRPCMining();
|
||||
bitdb.Flush(false);
|
||||
StopNode();
|
||||
{
|
||||
|
|
@ -1081,6 +1082,8 @@ bool AppInit2(boost::thread_group& threadGroup)
|
|||
|
||||
StartNode(threadGroup);
|
||||
|
||||
// InitRPCMining is needed here so getwork/getblocktemplate in the GUI debug console works properly.
|
||||
InitRPCMining();
|
||||
if (fServer)
|
||||
StartRPCThreads();
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue