aboutsummaryrefslogtreecommitdiff
path: root/src/rpcmining.cpp
diff options
context:
space:
mode:
authorJeff Garzik <[email protected]>2013-08-25 18:49:25 -0700
committerJeff Garzik <[email protected]>2013-08-25 18:49:25 -0700
commitbb7d0fc12fcfbb2a91e39cb49f2a0873344dbae0 (patch)
tree78ce02c824847489b87d7a76261f0b187c3f620e /src/rpcmining.cpp
parentMerge pull request #2938 from petertodd/op-reserved-weirdness (diff)
parentminer: constify CreateNewBlock() arg scriptPubKeyIn (diff)
downloaddiscoin-bb7d0fc12fcfbb2a91e39cb49f2a0873344dbae0.tar.xz
discoin-bb7d0fc12fcfbb2a91e39cb49f2a0873344dbae0.zip
Merge pull request #2928 from jgarzik/cnb-txout
CreateNewBlock / getblocktemplate cleaning
Diffstat (limited to 'src/rpcmining.cpp')
-rw-r--r--src/rpcmining.cpp5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp
index 25111d378..c7f516caa 100644
--- a/src/rpcmining.cpp
+++ b/src/rpcmining.cpp
@@ -149,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);
@@ -280,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");