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

Method GetCoin

src/test/coins_tests.cpp:52–56  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

50 explicit CCoinsViewTest(FastRandomContext& rng) : m_rng{rng} {}
51
52 std::optional<Coin> GetCoin(const COutPoint& outpoint) const override
53 {
54 if (auto it{map_.find(outpoint)}; it != map_.end() && !it->second.IsSpent()) return it->second;
55 return std::nullopt;
56 }
57
58 uint256 GetBestBlock() const override { return hashBestBlock_; }
59

Callers 7

BOOST_AUTO_TEST_CASEFunction · 0.45
CheckAccessCoinFunction · 0.45
BOOST_FIXTURE_TEST_CASEFunction · 0.45
gettxoutFunction · 0.45
getdescriptoractivityFunction · 0.45
FindCoinsFunction · 0.45
getUnspentOutputMethod · 0.45

Calls 3

findMethod · 0.80
endMethod · 0.45
IsSpentMethod · 0.45

Tested by

no test coverage detected