Get rid of remaining auto_ptr mentions

This commit is contained in:
lateminer
2018-01-06 16:44:09 +03:00
parent 99238ff2c8
commit b4b34ff770
2 changed files with 3 additions and 3 deletions

View File

@@ -436,7 +436,7 @@ void static BitcoinMiner(const CChainParams& chainparams)
unsigned int nTransactionsUpdatedLast = mempool.GetTransactionsUpdated();
CBlockIndex* pindexPrev = chainActive.Tip();
int64_t *nFees;
auto_ptr<CBlockTemplate> pblocktemplate(CreateNewBlock(chainparams, coinbaseScript->reserveScript, nFees, false));
std::unique_ptr<CBlockTemplate> 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<CBlockTemplate> pblocktemplate(CreateNewBlock(chainparams, reservekey.reserveScript, &nFees, true));
std::unique_ptr<CBlockTemplate> pblocktemplate(CreateNewBlock(chainparams, reservekey.reserveScript, &nFees, true));
if (!pblocktemplate.get())
return;

View File

@@ -818,7 +818,7 @@ UniValue checkkernel(const UniValue& params, bool fHelp)
pwalletMain->TopUpKeyPool();
CReserveKey pMiningKey(pwalletMain);
auto_ptr<CBlockTemplate> pblocktemplate(CreateNewBlock(Params(), pMiningKey.reserveScript, &nFees, true));
std::unique_ptr<CBlockTemplate> pblocktemplate(CreateNewBlock(Params(), pMiningKey.reserveScript, &nFees, true));
if (!pblocktemplate.get())
throw JSONRPCError(RPC_INTERNAL_ERROR, "Couldn't create new block");