From 6333bf96298164d079e17caf926057f2dee50c90 Mon Sep 17 00:00:00 2001 From: Jeff Garzik Date: Sat, 24 Aug 2013 00:45:17 -0400 Subject: [PATCH] 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. --- src/rpcmining.cpp | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/rpcmining.cpp b/src/rpcmining.cpp index c21c8116c6..f2c84bbcdd 100644 --- a/src/rpcmining.cpp +++ b/src/rpcmining.cpp @@ -469,7 +469,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");