mirror of
https://github.com/bitcoin/bitcoin.git
synced 2026-06-04 02:02:42 +02:00
refactor: encapsulate flags access for dirty and fresh checks
No behavior change. This prepares moving the cache entry flags field to private access. Co-Authored-By: l0rinc <pap.lorinc@gmail.com>
This commit is contained in:
@@ -175,7 +175,7 @@ public:
|
||||
bool BatchWrite(CCoinsMap& data, const uint256&, bool erase) final
|
||||
{
|
||||
for (auto it = data.begin(); it != data.end(); it = erase ? data.erase(it) : std::next(it)) {
|
||||
if (it->second.flags & CCoinsCacheEntry::DIRTY) {
|
||||
if (it->second.IsDirty()) {
|
||||
if (it->second.coin.IsSpent() && (it->first.n % 5) != 4) {
|
||||
m_data.erase(it->first);
|
||||
} else if (erase) {
|
||||
|
||||
Reference in New Issue
Block a user