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

Function InsertCoinsMapEntry

src/test/coins_tests.cpp:579–592  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

577}
578
579static size_t InsertCoinsMapEntry(CCoinsMap& map, CAmount value, char flags)
580{
581 if (value == ABSENT) {
582 assert(flags == NO_ENTRY);
583 return 0;
584 }
585 assert(flags != NO_ENTRY);
586 CCoinsCacheEntry entry;
587 entry.flags = flags;
588 SetCoinsValue(value, entry.coin);
589 auto inserted = map.emplace(OUTPOINT, std::move(entry));
590 assert(inserted.second);
591 return inserted.first->second.coin.DynamicMemoryUsage();
592}
593
594void GetCoinsMapEntry(const CCoinsMap& map, CAmount& value, char& flags)
595{

Callers 2

WriteCoinsViewEntryFunction · 0.85
SingleEntryCacheTestMethod · 0.85

Calls 2

SetCoinsValueFunction · 0.85
DynamicMemoryUsageMethod · 0.45

Tested by

no test coverage detected