diff options
author | Alex Morcos <morcos@chaincode.com> | 2015-12-15 15:26:44 -0500 |
---|---|---|
committer | Alex Morcos <morcos@chaincode.com> | 2016-05-18 14:11:12 -0400 |
commit | 4dc94d1036576fe988a066fdabc047350ccddda9 (patch) | |
tree | f78d4e5795a752408f165356cafc8f7bce8f5852 /src/rpc | |
parent | 239d4198645434542b01916dae5eebc7a3a7bbcc (diff) |
Refactor CreateNewBlock to be a method of the BlockAssembler class
Diffstat (limited to 'src/rpc')
-rw-r--r-- | src/rpc/mining.cpp | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/src/rpc/mining.cpp b/src/rpc/mining.cpp index 9a7d9d53a0..bd90cca1cc 100644 --- a/src/rpc/mining.cpp +++ b/src/rpc/mining.cpp @@ -111,7 +111,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; @@ -493,7 +493,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"); |