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.
This commit is contained in:
Jeff Garzik 2013-08-24 00:45:17 -04:00
parent 7e17018995
commit 7bb0f6c5e8
1 changed files with 2 additions and 1 deletions

View File

@ -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");