mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-03 09:43:55 +02:00
add ChainstateManager::MaybeRebalanceCaches()
Aside from in unittests, this method is unused at the moment. It will be used in upcoming commits that enable utxo snapshot activation.
This commit is contained in:
committed by
James O'Beirne
parent
f36aaa6392
commit
8ac3ef4699
@@ -794,6 +794,14 @@ public:
|
||||
//! chainstate to avoid duplicating block metadata.
|
||||
BlockManager m_blockman GUARDED_BY(::cs_main);
|
||||
|
||||
//! The total number of bytes available for us to use across all in-memory
|
||||
//! coins caches. This will be split somehow across chainstates.
|
||||
int64_t m_total_coinstip_cache{0};
|
||||
//
|
||||
//! The total number of bytes available for us to use across all leveldb
|
||||
//! coins databases. This will be split somehow across chainstates.
|
||||
int64_t m_total_coinsdb_cache{0};
|
||||
|
||||
//! Instantiate a new chainstate and assign it based upon whether it is
|
||||
//! from a snapshot.
|
||||
//!
|
||||
@@ -881,6 +889,10 @@ public:
|
||||
|
||||
//! Clear (deconstruct) chainstate data.
|
||||
void Reset();
|
||||
|
||||
//! Check to see if caches are out of balance and if so, call
|
||||
//! ResizeCoinsCaches() as needed.
|
||||
void MaybeRebalanceCaches() EXCLUSIVE_LOCKS_REQUIRED(::cs_main);
|
||||
};
|
||||
|
||||
/** DEPRECATED! Please use node.chainman instead. May only be used in validation.cpp internally */
|
||||
|
||||
Reference in New Issue
Block a user