diff --git a/src/qt/walletframe.cpp b/src/qt/walletframe.cpp --- a/src/qt/walletframe.cpp +++ b/src/qt/walletframe.cpp @@ -8,6 +8,7 @@ #include "bitcoingui.h" #include "walletview.h" +#include #include #include @@ -71,6 +72,7 @@ WalletView *walletView = mapWalletViews.value(name); walletStack->setCurrentWidget(walletView); + assert(walletView); walletView->updateEncryptionStatus(); return true; } diff --git a/src/validation.cpp b/src/validation.cpp --- a/src/validation.cpp +++ b/src/validation.cpp @@ -1708,6 +1708,7 @@ // further duplicate transactions descending from the known pairs either. If // we're on the known chain at height greater than where BIP34 activated, we // can save the db accesses needed for the BIP30 check. + assert(pindex->pprev); CBlockIndex *pindexBIP34height = pindex->pprev->GetAncestor(consensusParams.BIP34Height); // Only continue to enforce if we're below BIP34 activation height or the @@ -1891,6 +1892,7 @@ return false; } + assert(pindex->phashBlock); // add this block to the view's block chain view.SetBestBlock(pindex->GetBlockHash()); diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -595,6 +595,10 @@ continue; } + assert( + copyFrom && + "Oldest wallet transaction in range assumed to have been found."); + if (!copyFrom->IsEquivalentTo(*copyTo)) { continue; }