aboutsummaryrefslogtreecommitdiff
path: root/src/rpc/mining.cpp
diff options
context:
space:
mode:
authorWladimir J. van der Laan <laanwj@gmail.com>2016-06-13 11:27:11 +0200
committerWladimir J. van der Laan <laanwj@gmail.com>2016-06-13 11:35:55 +0200
commite1486eb95c50834179d42e3d056e11c2f7b4ebff (patch)
tree68a23a67e6ee2a7075548fc61b87b93a18530bf5 /src/rpc/mining.cpp
parent37c98307ac7645412ac153e376e6e1020d867202 (diff)
parentc2dd5a3c39156749e8ee24772d1fcb01404f2b6f (diff)
Merge #7598: Refactor CreateNewBlock to be a method of the BlockAssembler class
c2dd5a3 FIX: correctly measure size of priority block (Alex Morcos) a278764 FIX: Account for txs already added to block in addPriorityTxs (Alex Morcos) 4dc94d1 Refactor CreateNewBlock to be a method of the BlockAssembler class (Alex Morcos)
Diffstat (limited to 'src/rpc/mining.cpp')
-rw-r--r--src/rpc/mining.cpp4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rpc/mining.cpp b/src/rpc/mining.cpp
index 2bd52eadbc..94eeea91f3 100644
--- a/src/rpc/mining.cpp
+++ b/src/rpc/mining.cpp
@@ -112,7 +112,7 @@ UniValue generateBlocks(boost::shared_ptr<CReserveScript> coinbaseScript, int nG
UniValue blockHashes(UniValue::VARR);
while (nHeight < nHeightEnd)
{
- std::unique_ptr<CBlockTemplate> pblocktemplate(CreateNewBlock(Params(), coinbaseScript->reserveScript));
+ std::unique_ptr<CBlockTemplate> pblocktemplate(BlockAssembler(Params()).CreateNewBlock(coinbaseScript->reserveScript));
if (!pblocktemplate.get())
throw JSONRPCError(RPC_INTERNAL_ERROR, "Couldn't create new block");
CBlock *pblock = &pblocktemplate->block;
@@ -527,7 +527,7 @@ UniValue getblocktemplate(const UniValue& params, bool fHelp)
pblocktemplate = NULL;
}
CScript scriptDummy = CScript() << OP_TRUE;
- pblocktemplate = CreateNewBlock(Params(), scriptDummy);
+ pblocktemplate = BlockAssembler(Params()).CreateNewBlock(scriptDummy);
if (!pblocktemplate)
throw JSONRPCError(RPC_OUT_OF_MEMORY, "Out of memory");