| 654 | } |
| 655 | |
| 656 | static void WriteCoinsViewEntry(CCoinsView& view, const MaybeCoin& cache_coin) |
| 657 | { |
| 658 | CoinsCachePair sentinel{}; |
| 659 | sentinel.second.SelfRef(sentinel); |
| 660 | CCoinsMapMemoryResource resource; |
| 661 | CCoinsMap map{0, CCoinsMap::hasher{}, CCoinsMap::key_equal{}, &resource}; |
| 662 | if (cache_coin) InsertCoinsMapEntry(map, sentinel, *cache_coin); |
| 663 | size_t dirty_count{cache_coin && cache_coin->IsDirty()}; |
| 664 | auto cursor{CoinsViewCacheCursor(dirty_count, sentinel, map, /*will_erase=*/true)}; |
| 665 | view.BatchWrite(cursor, {}); |
| 666 | BOOST_CHECK_EQUAL(dirty_count, 0U); |
| 667 | } |
| 668 | |
| 669 | class SingleEntryCacheTest |
| 670 | { |
no test coverage detected