coins, refactor: Remove direct GetFlags access

We don't need so much access to the internals of CCoinsCacheEntry, since many tests are just exercising invalid combinations this way.
This implies that `AddFlags` has private access now.
This commit is contained in:
Lőrinc
2024-09-13 11:13:28 +02:00
parent 6b733699cf
commit 15aaa81c38
3 changed files with 42 additions and 42 deletions

View File

@@ -613,7 +613,9 @@ void GetCoinsMapEntry(const CCoinsMap& map, CAmount& value, char& flags, const C
} else {
value = it->second.coin.out.nValue;
}
flags = it->second.GetFlags();
flags = 0;
if (it->second.IsDirty()) flags |= DIRTY;
if (it->second.IsFresh()) flags |= FRESH;
assert(flags != NO_ENTRY);
}
}