aboutsummaryrefslogtreecommitdiff
path: root/src/rpcmining.cpp
diff options
context:
space:
mode:
authorJeff Garzik <jgarzik@bitpay.com>2013-08-24 00:45:17 -0400
committerJeff Garzik <jgarzik@bitpay.com>2013-08-24 00:45:17 -0400
commit7bb0f6c5e89a4d5c9a6ef42f5643f42646da44c9 (patch)
tree3bb44736b9465b1d99aabf079628c45d8c618aa4 /src/rpcmining.cpp
parent7e1701899534151972ddff3c08cc964a9db64bc5 (diff)
RPC: getblocktemplate does not require a key, to create a block template
getblocktemplate only uses certain portions of the coinbase transaction, notably ignoring the coinbase TX output entirely. Use CreateNewBlock() rather than CreateNewBlockWithKey(), eliminating the needless key passing. Should be zero behavior changes.
Diffstat (limited to 'src/rpcmining.cpp')
-rw-r--r--src/rpcmining.cpp3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp
index 8b562680ad..c7f516caa7 100644
--- a/src/rpcmining.cpp
+++ b/src/rpcmining.cpp
@@ -280,7 +280,8 @@ Value getblocktemplate(const Array& params, bool fHelp)
delete pblocktemplate;
pblocktemplate = NULL;
}
- pblocktemplate = CreateNewBlockWithKey(*pMiningKey);
+ CScript scriptDummy = CScript() << OP_TRUE;
+ pblocktemplate = CreateNewBlock(scriptDummy);
if (!pblocktemplate)
throw JSONRPCError(RPC_OUT_OF_MEMORY, "Out of memory");