From 45a93b635ea51f03aa985131a6d6fa0b80b7706b Mon Sep 17 00:00:00 2001 From: jl777 Date: Wed, 26 Apr 2017 19:20:43 +0300 Subject: [PATCH] Test --- src/wallet/wallet.cpp | 5 +++-- src/wallet/wallet.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index d1b007805..d3ba06713 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -642,6 +642,7 @@ void CWallet::IncrementNoteWitnesses(const CBlockIndex* pindex, const CBlock* pblockIn, ZCIncrementalMerkleTree& tree) { + fprintf(stderr,"A increment witness cache -> %d\n",(int32_t)nWitnessCacheSize); { LOCK(cs_wallet); for (std::pair& wtxItem : mapWallet) { @@ -670,7 +671,7 @@ void CWallet::IncrementNoteWitnesses(const CBlockIndex* pindex, } } if (nWitnessCacheSize < WITNESS_CACHE_SIZE) { - //fprintf(stderr,"increment nWitnesscache -> %d\n",(int32_t)nWitnessCacheSize); + fprintf(stderr,"increment nWitnesscache -> %d\n",(int32_t)nWitnessCacheSize); nWitnessCacheSize += 1; } @@ -784,7 +785,7 @@ 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; for (std::pair& wtxItem : mapWallet) { for (mapNoteData_t::value_type& item : wtxItem.second.mapNoteData) { diff --git a/src/wallet/wallet.h b/src/wallet/wallet.h index b45164300..ed7edbbc1 100644 --- a/src/wallet/wallet.h +++ b/src/wallet/wallet.h @@ -59,7 +59,7 @@ static const unsigned int MAX_FREE_TRANSACTION_CREATE_SIZE = 1000; // Should be large enough that we can expect not to reorg beyond our cache // unless there is some exceptional network disruption. #define _COINBASE_MATURITY 100 -static const unsigned int WITNESS_CACHE_SIZE = _COINBASE_MATURITY+1000; +static const unsigned int WITNESS_CACHE_SIZE = _COINBASE_MATURITY+10; class CAccountingEntry; class CBlockIndex;