From e9e7e410efcaf7f864b6a3d3f2343ed3fbb44bca Mon Sep 17 00:00:00 2001 From: jl777 Date: Mon, 17 Apr 2017 17:33:52 +0300 Subject: [PATCH] Test --- src/wallet/wallet.cpp | 3 +++ src/wallet/wallet.h | 2 +- 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 5f78be478..fc8160bb4 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -635,6 +635,7 @@ void CWallet::ClearNoteWitnessCache() } } nWitnessCacheSize = 0; + fprintf(stderr,"Clear witness cache\n"); } void CWallet::IncrementNoteWitnesses(const CBlockIndex* pindex, @@ -669,6 +670,7 @@ void CWallet::IncrementNoteWitnesses(const CBlockIndex* pindex, } } if (nWitnessCacheSize < WITNESS_CACHE_SIZE) { + fprintf(stderr,"increment nWitnesscache -> %d\n",(int32_t)nWitnessCacheSize); nWitnessCacheSize += 1; } @@ -782,6 +784,7 @@ void CWallet::DecrementNoteWitnesses(const CBlockIndex* pindex) } } } + 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 d52f547d0..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+2; +static const unsigned int WITNESS_CACHE_SIZE = _COINBASE_MATURITY+10; class CAccountingEntry; class CBlockIndex;