diff --git a/src/miner.cpp b/src/miner.cpp index 7a856ae29..543d3617b 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -390,7 +390,7 @@ void static BitcoinMiner(const CChainParams& chainparams) unsigned int nExtraNonce = 0; - boost::shared_ptr coinbaseScript; + std::shared_ptr coinbaseScript; GetMainSignals().ScriptForMining(coinbaseScript); try { diff --git a/src/rpc/mining.cpp b/src/rpc/mining.cpp index 254fbc300..fac37d340 100644 --- a/src/rpc/mining.cpp +++ b/src/rpc/mining.cpp @@ -28,7 +28,6 @@ #include #include -#include #include @@ -141,7 +140,7 @@ UniValue generate(const UniValue& params, bool fHelp) int nHeight = 0; int nGenerate = params[0].get_int(); - boost::shared_ptr coinbaseScript; + std::shared_ptr coinbaseScript; GetMainSignals().ScriptForMining(coinbaseScript); // If the keypool is exhausted, no script is returned at all. Catch this. diff --git a/src/rpc/server.cpp b/src/rpc/server.cpp index 102c77631..dc0d8074d 100644 --- a/src/rpc/server.cpp +++ b/src/rpc/server.cpp @@ -20,7 +20,6 @@ #include #include #include -#include #include #include #include // for to_upper() @@ -36,7 +35,7 @@ static CCriticalSection cs_rpcWarmup; static RPCTimerInterface* timerInterface = NULL; /* Map of name to timer. * @note Can be changed to std::unique_ptr when C++11 */ -static std::map > deadlineTimers; +static std::map > deadlineTimers; static struct CRPCSignals { @@ -492,7 +491,7 @@ void RPCRunLater(const std::string& name, boost::function func, int6 throw JSONRPCError(RPC_INTERNAL_ERROR, "No timer handler registered for RPC"); deadlineTimers.erase(name); LogPrint("rpc", "queue run of timer %s in %i seconds (using %s)\n", name, nSeconds, timerInterface->Name()); - deadlineTimers.insert(std::make_pair(name, boost::shared_ptr(timerInterface->NewTimer(func, nSeconds*1000)))); + deadlineTimers.insert(std::make_pair(name, std::shared_ptr(timerInterface->NewTimer(func, nSeconds*1000)))); } CRPCTable tableRPC; diff --git a/src/validationinterface.h b/src/validationinterface.h index 211bcf0c7..df03388b0 100644 --- a/src/validationinterface.h +++ b/src/validationinterface.h @@ -7,7 +7,6 @@ #define BITCOIN_VALIDATIONINTERFACE_H #include -#include class CBlock; struct CBlockLocator; @@ -38,7 +37,7 @@ protected: virtual void Inventory(const uint256 &hash) {} virtual void ResendWalletTransactions(int64_t nBestBlockTime) {} virtual void BlockChecked(const CBlock&, const CValidationState&) {} - virtual void GetScriptForMining(boost::shared_ptr&) {}; + virtual void GetScriptForMining(std::shared_ptr&) {}; virtual void ResetRequestCount(const uint256 &hash) {}; friend void ::RegisterValidationInterface(CValidationInterface*); friend void ::UnregisterValidationInterface(CValidationInterface*); @@ -61,7 +60,7 @@ struct CMainSignals { /** Notifies listeners of a block validation result */ boost::signals2::signal BlockChecked; /** Notifies listeners that a key for mining is required (coinbase) */ - boost::signals2::signal&)> ScriptForMining; + boost::signals2::signal&)> ScriptForMining; /** Notifies listeners that a block has been successfully mined */ boost::signals2::signal BlockFound; }; diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 91e55c43e..75fbcc98d 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -3473,9 +3473,9 @@ void CWallet::UpdatedTransaction(const uint256 &hashTx) } } -void CWallet::GetScriptForMining(boost::shared_ptr &script) +void CWallet::GetScriptForMining(std::shared_ptr &script) { - boost::shared_ptr rKey(new CReserveKey(this)); + std::shared_ptr rKey = std::make_shared(this); CPubKey pubkey; if (!rKey->GetReservedKey(pubkey)) return; diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index 63ecbc7fd..9b8125361 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -26,8 +26,6 @@ #include #include -#include - extern CWallet* pwalletMain; /** @@ -763,7 +761,7 @@ public: } } - void GetScriptForMining(boost::shared_ptr &script); + void GetScriptForMining(std::shared_ptr &script); void ResetRequestCount(const uint256 &hash) { LOCK(cs_wallet);