Fix KMD lockup on pools, try new fix electrum crash.
This commit is contained in:
@@ -3978,8 +3978,10 @@ bool static DisconnectTip(CValidationState &state, bool fBare = false) {
|
|||||||
if ((i == (block.vtx.size() - 1)) && (ASSETCHAINS_STAKED != 0 && (komodo_isPoS((CBlock *)&block,pindexDelete->GetHeight()) != 0)))
|
if ((i == (block.vtx.size() - 1)) && (ASSETCHAINS_STAKED != 0 && (komodo_isPoS((CBlock *)&block,pindexDelete->GetHeight()) != 0)))
|
||||||
{
|
{
|
||||||
#ifdef ENABLE_WALLET
|
#ifdef ENABLE_WALLET
|
||||||
LOCK2(cs_main, pwalletMain->cs_wallet);
|
if (!fDisableWallet) {
|
||||||
pwalletMain->EraseFromWallet(tx.GetHash());
|
LOCK(pwalletMain->cs_wallet);
|
||||||
|
pwalletMain->EraseFromWallet(tx.GetHash());
|
||||||
|
}
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
|
|||||||
@@ -803,6 +803,8 @@ CBlockTemplate* CreateNewBlock(CPubKey _pk,const CScript& _scriptPubKeyIn, int32
|
|||||||
//fprintf(stderr,"check validity\n");
|
//fprintf(stderr,"check validity\n");
|
||||||
if ( !TestBlockValidity(state, *pblock, pindexPrev, false, false)) // invokes CC checks
|
if ( !TestBlockValidity(state, *pblock, pindexPrev, false, false)) // invokes CC checks
|
||||||
{
|
{
|
||||||
|
LEAVE_CRITICAL_SECTION(cs_main);
|
||||||
|
LEAVE_CRITICAL_SECTION(mempool.cs);
|
||||||
throw std::runtime_error("CreateNewBlock(): TestBlockValidity failed");
|
throw std::runtime_error("CreateNewBlock(): TestBlockValidity failed");
|
||||||
}
|
}
|
||||||
//fprintf(stderr,"valid\n");
|
//fprintf(stderr,"valid\n");
|
||||||
|
|||||||
Reference in New Issue
Block a user