diff --git a/src/miner.cpp b/src/miner.cpp index 093549eaf..7a856ae29 100644 --- a/src/miner.cpp +++ b/src/miner.cpp @@ -436,7 +436,7 @@ void static BitcoinMiner(const CChainParams& chainparams) unsigned int nTransactionsUpdatedLast = mempool.GetTransactionsUpdated(); CBlockIndex* pindexPrev = chainActive.Tip(); int64_t *nFees; - auto_ptr pblocktemplate(CreateNewBlock(chainparams, coinbaseScript->reserveScript, nFees, false)); + std::unique_ptr pblocktemplate(CreateNewBlock(chainparams, coinbaseScript->reserveScript, nFees, false)); if (!pblocktemplate.get()) { LogPrintf("Error in BitcoinMiner: Keypool ran out, please call keypoolrefill before restarting the mining thread\n"); @@ -646,7 +646,7 @@ void ThreadStakeMiner(CWallet *pwallet, const CChainParams& chainparams) // Create new block // int64_t nFees; - auto_ptr pblocktemplate(CreateNewBlock(chainparams, reservekey.reserveScript, &nFees, true)); + std::unique_ptr pblocktemplate(CreateNewBlock(chainparams, reservekey.reserveScript, &nFees, true)); if (!pblocktemplate.get()) return; diff --git a/src/rpc/mining.cpp b/src/rpc/mining.cpp index 27be0299d..254fbc300 100644 --- a/src/rpc/mining.cpp +++ b/src/rpc/mining.cpp @@ -818,7 +818,7 @@ UniValue checkkernel(const UniValue& params, bool fHelp) pwalletMain->TopUpKeyPool(); CReserveKey pMiningKey(pwalletMain); - auto_ptr pblocktemplate(CreateNewBlock(Params(), pMiningKey.reserveScript, &nFees, true)); + std::unique_ptr pblocktemplate(CreateNewBlock(Params(), pMiningKey.reserveScript, &nFees, true)); if (!pblocktemplate.get()) throw JSONRPCError(RPC_INTERNAL_ERROR, "Couldn't create new block");