|
@ -745,7 +745,8 @@ UniValue getblocktemplate(const UniValue& params, bool fHelp) |
|
|
#endif |
|
|
#endif |
|
|
ENTER_CRITICAL_SECTION(cs_main); |
|
|
ENTER_CRITICAL_SECTION(cs_main); |
|
|
if (!pblocktemplate) |
|
|
if (!pblocktemplate) |
|
|
throw JSONRPCError(RPC_OUT_OF_MEMORY, "Out of memory or no available utxo for staking"); |
|
|
throw std::runtime_error("CreateNewBlock(): create block failed"); |
|
|
|
|
|
//throw JSONRPCError(RPC_OUT_OF_MEMORY, "Out of memory or no available utxo for staking");
|
|
|
|
|
|
|
|
|
// Need to update only after we know CreateNewBlockWithKey succeeded
|
|
|
// Need to update only after we know CreateNewBlockWithKey succeeded
|
|
|
pindexPrev = pindexPrevNew; |
|
|
pindexPrev = pindexPrevNew; |
|
|