MCPcopy Create free account
hub / github.com/ElementsProject/elements / GetCoinsMapEntry

Function GetCoinsMapEntry

src/test/coins_tests.cpp:594–609  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

592}
593
594void GetCoinsMapEntry(const CCoinsMap& map, CAmount& value, char& flags)
595{
596 auto it = map.find(OUTPOINT);
597 if (it == map.end()) {
598 value = ABSENT;
599 flags = NO_ENTRY;
600 } else {
601 if (it->second.coin.IsSpent()) {
602 value = SPENT;
603 } else {
604 value = it->second.coin.out.nValue.GetAmount();
605 }
606 flags = it->second.flags;
607 assert(flags != NO_ENTRY);
608 }
609}
610
611void WriteCoinsViewEntry(CCoinsView& view, CAmount value, char flags)
612{

Callers 4

CheckAccessCoinFunction · 0.85
CheckSpendCoinsFunction · 0.85
CheckAddCoinBaseFunction · 0.85
CheckWriteCoinsFunction · 0.85

Calls 4

findMethod · 0.80
GetAmountMethod · 0.80
endMethod · 0.45
IsSpentMethod · 0.45

Tested by

no test coverage detected