Avoid coredumps in ReacceptWalletTransactions and log the situation, which is possibly caused by corrupt wallet tx data
This commit is contained in:
@@ -2847,7 +2847,12 @@ void CWallet::ReacceptWalletTransactions()
|
|||||||
{
|
{
|
||||||
const uint256& wtxid = item.first;
|
const uint256& wtxid = item.first;
|
||||||
CWalletTx& wtx = item.second;
|
CWalletTx& wtx = item.second;
|
||||||
assert(wtx.GetHash() == wtxid);
|
if(wtx.GetHash() != wtxid) {
|
||||||
|
LogPrintf("%s: Something funky going on, skipping this tx. wtx.GetHash() != wtxid (%s != %s)\n", __func__, wtx.GetHash().ToString().c_str(), wtxid.ToString().c_str() );
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
// Crashing the node because of this is lame
|
||||||
|
// assert(wtx.GetHash() == wtxid);
|
||||||
|
|
||||||
int nDepth = wtx.GetDepthInMainChain();
|
int nDepth = wtx.GetDepthInMainChain();
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user