From 8432a64f0ebd0e089f7811a85d7a025a62de5b08 Mon Sep 17 00:00:00 2001 From: jl777 Date: Sat, 3 Dec 2016 11:41:16 -0300 Subject: [PATCH] test --- src/pow.cpp | 2 +- src/wallet/wallet.cpp | 4 +++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/src/pow.cpp b/src/pow.cpp index 9fd437eac..0cdfa066f 100644 --- a/src/pow.cpp +++ b/src/pow.cpp @@ -152,7 +152,7 @@ bool CheckProofOfWork(int32_t height,uint8_t *pubkey33,uint256 hash, unsigned in printf(" hash vs "); for (i=31; i>=0; i--) printf("%02x",((uint8_t *)&bnTarget)[i]); - printf(" REWIND.%d special.%d notaryid.%d ht.%d mod.%d error\n",KOMODO_REWIND,special,notaryid,height,(height % 35)); + printf(" ht.%d REWIND.%d special.%d notaryid.%d ht.%d mod.%d error\n",height,KOMODO_REWIND,special,notaryid,height,(height % 35)); if ( height <= KOMODO_REWIND ) return error("CheckProofOfWork(): hash doesn't match nBits"); } diff --git a/src/wallet/wallet.cpp b/src/wallet/wallet.cpp index 0ef2bb723..9d9712166 100644 --- a/src/wallet/wallet.cpp +++ b/src/wallet/wallet.cpp @@ -748,6 +748,7 @@ void CWallet::IncrementNoteWitnesses(const CBlockIndex* pindex, void CWallet::DecrementNoteWitnesses() { + extern int32_t KOMODO_REWIND; { LOCK(cs_wallet); for (std::pair& wtxItem : mapWallet) { @@ -770,12 +771,13 @@ void CWallet::DecrementNoteWitnesses() } } // TODO: If nWitnessCache is zero, we need to regenerate the caches (#1302) - assert(nWitnessCacheSize > 0); if ( nWitnessCacheSize <= 0 ) { extern char ASSETCHAINS_SYMBOL[16]; fprintf(stderr,"%s nWitnessCacheSize.%d\n",ASSETCHAINS_SYMBOL,(int32_t)nWitnessCacheSize); } + if ( KOMODO_REWIND == 0 ) + assert(nWitnessCacheSize > 0); if (fFileBacked) { CWalletDB walletdb(strWalletFile); WriteWitnessCache(walletdb);