remove rescan for corrupt tx and add LOCK2 for deleteion of staking tx. debug prints.
This commit is contained in:
@@ -3852,6 +3852,7 @@ bool static DisconnectTip(CValidationState &state, bool fBare = false) {
|
|||||||
if ((i == (block.vtx.size() - 1)) && (ASSETCHAINS_STAKED != 0 && (komodo_isPoS((CBlock *)&block) != 0)))
|
if ((i == (block.vtx.size() - 1)) && (ASSETCHAINS_STAKED != 0 && (komodo_isPoS((CBlock *)&block) != 0)))
|
||||||
{
|
{
|
||||||
#ifdef ENABLE_WALLET
|
#ifdef ENABLE_WALLET
|
||||||
|
LOCK2(cs_main, pwalletMain->cs_wallet);
|
||||||
pwalletMain->EraseFromWallet(tx.GetHash());
|
pwalletMain->EraseFromWallet(tx.GetHash());
|
||||||
#endif
|
#endif
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -919,8 +919,13 @@ DBErrors CWalletDB::LoadWallet(CWallet* pwallet)
|
|||||||
// Leave other errors alone, if we try to fix them we might make things worse.
|
// Leave other errors alone, if we try to fix them we might make things worse.
|
||||||
fNoncriticalErrors = true; // ... but do warn the user there is something wrong.
|
fNoncriticalErrors = true; // ... but do warn the user there is something wrong.
|
||||||
if (strType == "tx" )
|
if (strType == "tx" )
|
||||||
|
{
|
||||||
// Rescan if there is a bad transaction record..
|
// Rescan if there is a bad transaction record..
|
||||||
SoftSetBoolArg("-rescan", true);
|
//SoftSetBoolArg("-rescan", true);
|
||||||
|
uint256 hash;
|
||||||
|
ssKey >> hash;
|
||||||
|
fprintf(stderr, "TX corrupted hash: %s\n", hash.ToString().c_str());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!strErr.empty())
|
if (!strErr.empty())
|
||||||
|
|||||||
Reference in New Issue
Block a user