This commit is contained in:
jl777
2017-04-26 23:21:53 +03:00
parent 438ba9c17d
commit 4c73b58b83

View File

@@ -786,7 +786,13 @@ void CWallet::DecrementNoteWitnesses(const CBlockIndex* pindex)
} }
} }
fprintf(stderr,"decrement witness cache -> %d\n",(int32_t)nWitnessCacheSize); fprintf(stderr,"decrement witness cache -> %d\n",(int32_t)nWitnessCacheSize);
nWitnessCacheSize -= 1; if ( nWitnessCacheSize > 0 )
nWitnessCacheSize -= 1;
else
{
extern char ASSETCHAINS_SYMBOL[16];
fprintf(stderr,"%s nWitnessCacheSize.%d\n",ASSETCHAINS_SYMBOL,(int32_t)nWitnessCacheSize);
}
for (std::pair<const uint256, CWalletTx>& wtxItem : mapWallet) { for (std::pair<const uint256, CWalletTx>& wtxItem : mapWallet) {
for (mapNoteData_t::value_type& item : wtxItem.second.mapNoteData) { for (mapNoteData_t::value_type& item : wtxItem.second.mapNoteData) {
CNoteData* nd = &(item.second); CNoteData* nd = &(item.second);
@@ -805,11 +811,6 @@ void CWallet::DecrementNoteWitnesses(const CBlockIndex* pindex)
} }
} }
} }
if ( nWitnessCacheSize <= 0 )
{
extern char ASSETCHAINS_SYMBOL[16];
fprintf(stderr,"%s nWitnessCacheSize.%d\n",ASSETCHAINS_SYMBOL,(int32_t)nWitnessCacheSize);
}
if ( KOMODO_REWIND == 0 ) if ( KOMODO_REWIND == 0 )
assert(nWitnessCacheSize > 0); assert(nWitnessCacheSize > 0);
//if (fFileBacked) { //if (fFileBacked) {