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

Function IsIssuanceInMoneyRange

src/policy/policy.cpp:311–327  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

309}
310
311bool IsIssuanceInMoneyRange(const CTransaction& tx)
312{
313 for (size_t i = 0; i < tx.vin.size(); ++i) {
314 const CAssetIssuance& issuance = tx.vin[i].assetIssuance;
315 if (issuance.IsNull()) {
316 continue;
317 }
318 if (issuance.nAmount.IsExplicit() && !MoneyRange(issuance.nAmount.GetAmount())) {
319 return false;
320 }
321 // check the reissuance token is in range
322 if (!issuance.nInflationKeys.IsNull() && issuance.nInflationKeys.IsExplicit() && !MoneyRange(issuance.nInflationKeys.GetAmount())) {
323 return false;
324 }
325 }
326 return true;
327}
328
329bool SpendsNonAnchorWitnessProg(const CTransaction& tx, const CCoinsViewCache& prevouts)
330{

Callers 1

PreChecksMethod · 0.85

Calls 5

IsExplicitMethod · 0.80
GetAmountMethod · 0.80
MoneyRangeFunction · 0.50
sizeMethod · 0.45
IsNullMethod · 0.45

Tested by

no test coverage detected