mirror of
https://github.com/dashpay/dash.git
synced 2024-12-28 21:42:47 +01:00
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:
parent
b3060a26d0
commit
6333bf9629
@ -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");
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user