mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-03-25 06:55:32 +01:00
Use std::shared_ptr instead of boost::shared_ptr in ScriptForMining
This commit is contained in:
@@ -27,7 +27,6 @@
|
||||
#include <stdint.h>
|
||||
|
||||
#include <boost/assign/list_of.hpp>
|
||||
#include <boost/shared_ptr.hpp>
|
||||
|
||||
#include <univalue.h>
|
||||
|
||||
@@ -95,7 +94,7 @@ UniValue getnetworkhashps(const JSONRPCRequest& request)
|
||||
return GetNetworkHashPS(request.params.size() > 0 ? request.params[0].get_int() : 120, request.params.size() > 1 ? request.params[1].get_int() : -1);
|
||||
}
|
||||
|
||||
UniValue generateBlocks(boost::shared_ptr<CReserveScript> coinbaseScript, int nGenerate, uint64_t nMaxTries, bool keepScript)
|
||||
UniValue generateBlocks(std::shared_ptr<CReserveScript> coinbaseScript, int nGenerate, uint64_t nMaxTries, bool keepScript)
|
||||
{
|
||||
static const int nInnerLoopCount = 0x10000;
|
||||
int nHeightStart = 0;
|
||||
@@ -167,7 +166,7 @@ UniValue generate(const JSONRPCRequest& request)
|
||||
nMaxTries = request.params[1].get_int();
|
||||
}
|
||||
|
||||
boost::shared_ptr<CReserveScript> coinbaseScript;
|
||||
std::shared_ptr<CReserveScript> coinbaseScript;
|
||||
GetMainSignals().ScriptForMining(coinbaseScript);
|
||||
|
||||
// If the keypool is exhausted, no script is returned at all. Catch this.
|
||||
@@ -208,7 +207,7 @@ UniValue generatetoaddress(const JSONRPCRequest& request)
|
||||
if (!address.IsValid())
|
||||
throw JSONRPCError(RPC_INVALID_ADDRESS_OR_KEY, "Error: Invalid address");
|
||||
|
||||
boost::shared_ptr<CReserveScript> coinbaseScript(new CReserveScript());
|
||||
std::shared_ptr<CReserveScript> coinbaseScript = std::make_shared<CReserveScript>();
|
||||
coinbaseScript->reserveScript = GetScriptForDestination(address.Get());
|
||||
|
||||
return generateBlocks(coinbaseScript, nGenerate, nMaxTries, false);
|
||||
|
||||
Reference in New Issue
Block a user