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

Function GetCoinsMapEntry

src/test/coins_tests.cpp:570–585  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

568}
569
570void GetCoinsMapEntry(const CCoinsMap& map, CAmount& value, char& flags)
571{
572 auto it = map.find(OUTPOINT);
573 if (it == map.end()) {
574 value = ABSENT;
575 flags = NO_ENTRY;
576 } else {
577 if (it->second.coin.IsSpent()) {
578 value = PRUNED;
579 } else {
580 value = it->second.coin.out.nValue;
581 }
582 flags = it->second.flags;
583 assert(flags != NO_ENTRY);
584 }
585}
586
587void WriteCoinsViewEntry(CCoinsView& view, CAmount value, char flags)
588{

Callers 4

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

Calls 3

findMethod · 0.45
endMethod · 0.45
IsSpentMethod · 0.45

Tested by

no test coverage detected