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

Function GetCoinsMapEntry

src/test/coins_tests.cpp:646–654  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

644}
645
646static MaybeCoin GetCoinsMapEntry(const CCoinsMap& map, const COutPoint& outp = OUTPOINT)
647{
648 if (auto it{map.find(outp)}; it != map.end()) {
649 return CoinEntry{
650 it->second.coin.IsSpent() ? SPENT : it->second.coin.out.nValue,
651 CoinEntry::ToState(it->second.IsDirty(), it->second.IsFresh())};
652 }
653 return MISSING;
654}
655
656static void WriteCoinsViewEntry(CCoinsView& view, const MaybeCoin& cache_coin)
657{

Callers 5

CheckAccessCoinFunction · 0.85
CheckSpendCoinsFunction · 0.85
CheckAddCoinFunction · 0.85
CheckWriteCoinsFunction · 0.85
TestFlushBehaviorMethod · 0.85

Calls 5

findMethod · 0.80
endMethod · 0.45
IsSpentMethod · 0.45
IsDirtyMethod · 0.45
IsFreshMethod · 0.45

Tested by

no test coverage detected