|
|
@ -717,10 +717,12 @@ UniValue getblocktemplate(const UniValue& params, bool fHelp) |
|
|
|
} |
|
|
|
#ifdef ENABLE_WALLET |
|
|
|
CReserveKey reservekey(pwalletMain); |
|
|
|
pblocktemplate = CreateNewBlockWithKey(reservekey,chainActive.LastTip()->GetHeight()+1,KOMODO_MAXGPUCOUNT,false); |
|
|
|
LEAVE_CRITICAL_SECTION(cs_main); |
|
|
|
pblocktemplate = CreateNewBlockWithKey(reservekey,pindexPrevNew->GetHeight()+1,KOMODO_MAXGPUCOUNT,false); |
|
|
|
#else |
|
|
|
pblocktemplate = CreateNewBlockWithKey(); |
|
|
|
#endif |
|
|
|
ENTER_CRITICAL_SECTION(cs_main); |
|
|
|
if (!pblocktemplate) |
|
|
|
throw JSONRPCError(RPC_OUT_OF_MEMORY, "Out of memory or no available utxo for staking"); |
|
|
|
|
|
|
|