MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / CheckAccessCoin

Function CheckAccessCoin

src/test/coins_tests.cpp:686–693  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

684};
685
686static void CheckAccessCoin(const CAmount base_value, const MaybeCoin& cache_coin, const MaybeCoin& expected)
687{
688 SingleEntryCacheTest test{base_value, cache_coin};
689 auto& coin = test.cache.AccessCoin(OUTPOINT);
690 BOOST_CHECK_EQUAL(coin.IsSpent(), !test.cache.GetCoin(OUTPOINT));
691 test.cache.SelfTest(/*sanity_check=*/false);
692 BOOST_CHECK_EQUAL(GetCoinsMapEntry(test.cache.map()), expected);
693}
694
695BOOST_AUTO_TEST_CASE(ccoins_access)
696{

Callers 1

BOOST_AUTO_TEST_CASEFunction · 0.85

Calls 4

GetCoinsMapEntryFunction · 0.85
SelfTestMethod · 0.80
IsSpentMethod · 0.45
GetCoinMethod · 0.45

Tested by

no test coverage detected