diff options
author | Pieter Wuille <pieter.wuille@gmail.com> | 2017-05-04 00:15:36 -0700 |
---|---|---|
committer | Pieter Wuille <pieter.wuille@gmail.com> | 2017-06-01 13:15:25 -0700 |
commit | 73de2c1ff345ac38c098d7b1bef03176f3ea1f16 (patch) | |
tree | 697e34ca54310c6598ee033af7611f63173b57a5 /src/test/coins_tests.cpp | |
parent | 119e552f7ccd49c0137a3c6b4f94018a84d69620 (diff) |
Rename CCoinsCacheEntry::coins to coin
Diffstat (limited to 'src/test/coins_tests.cpp')
-rw-r--r-- | src/test/coins_tests.cpp | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/src/test/coins_tests.cpp b/src/test/coins_tests.cpp index f3f6e9f5f5..53e01636c3 100644 --- a/src/test/coins_tests.cpp +++ b/src/test/coins_tests.cpp @@ -64,8 +64,8 @@ public: for (CCoinsMap::iterator it = mapCoins.begin(); it != mapCoins.end(); ) { if (it->second.flags & CCoinsCacheEntry::DIRTY) { // Same optimization used in CCoinsViewDB is to only write dirty entries. - map_[it->first] = it->second.coins; - if (it->second.coins.IsPruned() && insecure_rand() % 3 == 0) { + map_[it->first] = it->second.coin; + if (it->second.coin.IsPruned() && insecure_rand() % 3 == 0) { // Randomly delete empty entries on write. map_.erase(it->first); } @@ -89,7 +89,7 @@ public: size_t ret = memusage::DynamicUsage(cacheCoins); size_t count = 0; for (CCoinsMap::iterator it = cacheCoins.begin(); it != cacheCoins.end(); it++) { - ret += it->second.coins.DynamicMemoryUsage(); + ret += it->second.coin.DynamicMemoryUsage(); ++count; } BOOST_CHECK_EQUAL(GetCacheSize(), count); @@ -554,10 +554,10 @@ size_t InsertCoinsMapEntry(CCoinsMap& map, CAmount value, char flags) assert(flags != NO_ENTRY); CCoinsCacheEntry entry; entry.flags = flags; - SetCoinsValue(value, entry.coins); + SetCoinsValue(value, entry.coin); auto inserted = map.emplace(OUTPOINT, std::move(entry)); assert(inserted.second); - return inserted.first->second.coins.DynamicMemoryUsage(); + return inserted.first->second.coin.DynamicMemoryUsage(); } void GetCoinsMapEntry(const CCoinsMap& map, CAmount& value, char& flags) @@ -567,10 +567,10 @@ void GetCoinsMapEntry(const CCoinsMap& map, CAmount& value, char& flags) value = ABSENT; flags = NO_ENTRY; } else { - if (it->second.coins.IsPruned()) { + if (it->second.coin.IsPruned()) { value = PRUNED; } else { - value = it->second.coins.out.nValue; + value = it->second.coin.out.nValue; } flags = it->second.flags; assert(flags != NO_ENTRY); |