diff options
Diffstat (limited to 'src/rpcmining.cpp')
| -rw-r--r-- | src/rpcmining.cpp | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp index a70c0958d..c7f516caa 100644 --- a/src/rpcmining.cpp +++ b/src/rpcmining.cpp @@ -6,6 +6,7 @@ #include "chainparams.h" #include "db.h" #include "init.h" +#include "miner.h" #include "bitcoinrpc.h" using namespace json_spirit; @@ -148,7 +149,7 @@ Value getwork(const Array& params, bool fHelp) nStart = GetTime(); // Create new block - pblocktemplate = CreateNewBlock(*pMiningKey); + pblocktemplate = CreateNewBlockWithKey(*pMiningKey); if (!pblocktemplate) throw JSONRPCError(RPC_OUT_OF_MEMORY, "Out of memory"); vNewBlockTemplate.push_back(pblocktemplate); @@ -279,7 +280,8 @@ Value getblocktemplate(const Array& params, bool fHelp) delete pblocktemplate; pblocktemplate = NULL; } - pblocktemplate = CreateNewBlock(*pMiningKey); + CScript scriptDummy = CScript() << OP_TRUE; + pblocktemplate = CreateNewBlock(scriptDummy); if (!pblocktemplate) throw JSONRPCError(RPC_OUT_OF_MEMORY, "Out of memory"); |