Changeset View
Changeset View
Standalone View
Standalone View
src/test/coins_tests.cpp
Show First 20 Lines • Show All 604 Lines • ▼ Show 20 Lines | if (it == map.end()) { | ||||
flags = it->second.flags; | flags = it->second.flags; | ||||
assert(flags != NO_ENTRY); | assert(flags != NO_ENTRY); | ||||
} | } | ||||
} | } | ||||
void WriteCoinViewEntry(CCoinsView &view, const Amount value, char flags) { | void WriteCoinViewEntry(CCoinsView &view, const Amount value, char flags) { | ||||
CCoinsMap map; | CCoinsMap map; | ||||
InsertCoinMapEntry(map, value, flags); | InsertCoinMapEntry(map, value, flags); | ||||
view.BatchWrite(map, {}); | view.BatchWrite(map, {}); | ||||
} | } | ||||
class SingleEntryCacheTest { | class SingleEntryCacheTest { | ||||
public: | public: | ||||
SingleEntryCacheTest(const Amount base_value, const Amount cache_value, | SingleEntryCacheTest(const Amount base_value, const Amount cache_value, | ||||
char cache_flags) { | char cache_flags) { | ||||
WriteCoinViewEntry(base, base_value, | WriteCoinViewEntry(base, base_value, | ||||
▲ Show 20 Lines • Show All 277 Lines • Show Last 20 Lines |