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

Function generateEmptyCoin

src/coins.cpp:164–169  ·  view source on GitHub ↗

ELEMENTS: Because g_con_elementsmode is only set after the moment coinEmpty is initialized, we have to force set it to an empty coin without the default asset commitment.

Source from the content-addressed store, hash-verified

162// Because g_con_elementsmode is only set after the moment coinEmpty is initialized,
163// we have to force set it to an empty coin without the default asset commitment.
164Coin generateEmptyCoin() {
165 Coin coin;
166 coin.out.nValue.vchCommitment.clear();
167 coin.out.nAsset.vchCommitment.clear();
168 return coin;
169}
170static const Coin coinEmpty = generateEmptyCoin();
171
172const Coin& CCoinsViewCache::AccessCoin(const COutPoint &outpoint) const {

Callers 1

coins.cppFile · 0.85

Calls 1

clearMethod · 0.45

Tested by

no test coverage detected