better fix

This commit is contained in:
blackjok3r
2019-06-14 01:53:17 +08:00
parent 0d7c2f33fc
commit f2645aed1b

View File

@@ -223,9 +223,12 @@ CBlockTemplate* CreateNewBlock(CPubKey _pk,const CScript& _scriptPubKeyIn, int32
uint256 cbHash; uint256 cbHash;
boost::this_thread::interruption_point(); // exit thread before entering locks.
CBlockIndex* pindexPrev = 0; CBlockIndex* pindexPrev = 0;
{ {
boost::this_thread::interruption_point(); // exit thread before entering locks. // this should stop create block ever exiting until it has returned something.
boost::this_thread::disable_interruption();
ENTER_CRITICAL_SECTION(cs_main); ENTER_CRITICAL_SECTION(cs_main);
ENTER_CRITICAL_SECTION(mempool.cs); ENTER_CRITICAL_SECTION(mempool.cs);
pindexPrev = chainActive.LastTip(); pindexPrev = chainActive.LastTip();