From 36e826cea14585f68d5c363a82c1a887a779e130 Mon Sep 17 00:00:00 2001 From: Gavin Andresen Date: Thu, 23 May 2013 14:13:05 -0400 Subject: Clean up mining CReserveKey to prevent crash at shutdown Fixes issue#2687 --- src/bitcoinrpc.cpp | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src/bitcoinrpc.cpp') diff --git a/src/bitcoinrpc.cpp b/src/bitcoinrpc.cpp index a9b73fd5a..2c4744a57 100644 --- a/src/bitcoinrpc.cpp +++ b/src/bitcoinrpc.cpp @@ -30,6 +30,10 @@ using namespace boost; using namespace boost::asio; using namespace json_spirit; +// Key used by getwork/getblocktemplate miners. +// Allocated in StartRPCThreads, free'd in StopRPCThreads +CReserveKey* pMiningKey = NULL; + static std::string strRPCUserColonPass; // These are created by StartRPCThreads, destroyed in StopRPCThreads @@ -722,6 +726,9 @@ static void RPCAcceptHandler(boost::shared_ptr< basic_socket_acceptorstop(); -- cgit v1.2.3