@@ -28,7 +28,8 @@
|
|||||||
#define KOMODO_FIRSTFUNGIBLEID 100
|
#define KOMODO_FIRSTFUNGIBLEID 100
|
||||||
#define KOMODO_SAPLING_ACTIVATION 1544832000 // Dec 15th, 2018
|
#define KOMODO_SAPLING_ACTIVATION 1544832000 // Dec 15th, 2018
|
||||||
#define KOMODO_SAPLING_DEADLINE 1550188800 // Feb 15th, 2019
|
#define KOMODO_SAPLING_DEADLINE 1550188800 // Feb 15th, 2019
|
||||||
|
#define _COINBASE_MATURITY 100
|
||||||
|
|
||||||
extern uint8_t ASSETCHAINS_TXPOW,ASSETCHAINS_PUBLIC;
|
extern uint8_t ASSETCHAINS_TXPOW,ASSETCHAINS_PUBLIC;
|
||||||
int32_t MAX_BLOCK_SIZE(int32_t height);
|
int32_t MAX_BLOCK_SIZE(int32_t height);
|
||||||
|
|
||||||
|
|||||||
@@ -1184,6 +1184,7 @@ bool DecrementNoteWitnesses(NoteDataMap& noteDataMap, int indexHeight, int64_t n
|
|||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
void CWallet::DecrementNoteWitnesses(const CBlockIndex* pindex)
|
void CWallet::DecrementNoteWitnesses(const CBlockIndex* pindex)
|
||||||
{
|
{
|
||||||
LOCK(cs_wallet);
|
LOCK(cs_wallet);
|
||||||
@@ -1193,10 +1194,17 @@ void CWallet::DecrementNoteWitnesses(const CBlockIndex* pindex)
|
|||||||
if (!::DecrementNoteWitnesses(wtxItem.second.mapSaplingNoteData, pindex->GetHeight(), nWitnessCacheSize))
|
if (!::DecrementNoteWitnesses(wtxItem.second.mapSaplingNoteData, pindex->GetHeight(), nWitnessCacheSize))
|
||||||
needsRescan = true;
|
needsRescan = true;
|
||||||
}
|
}
|
||||||
nWitnessCacheSize -= 1;
|
if ( WITNESS_CACHE_SIZE == _COINBASE_MATURITY+10 )
|
||||||
// TODO: If nWitnessCache is zero, we need to regenerate the caches (#1302)
|
{
|
||||||
assert(nWitnessCacheSize > 0);
|
nWitnessCacheSize -= 1;
|
||||||
|
// TODO: If nWitnessCache is zero, we need to regenerate the caches (#1302)
|
||||||
|
assert(nWitnessCacheSize > 0);
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if ( nWitnessCacheSize > 0 )
|
||||||
|
nWitnessCacheSize--
|
||||||
|
}
|
||||||
// For performance reasons, we write out the witness cache in
|
// For performance reasons, we write out the witness cache in
|
||||||
// CWallet::SetBestChain() (which also ensures that overall consistency
|
// CWallet::SetBestChain() (which also ensures that overall consistency
|
||||||
// of the wallet.dat is maintained).
|
// of the wallet.dat is maintained).
|
||||||
|
|||||||
Reference in New Issue
Block a user