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

Function GetIssuanceSHA256

src/script/interpreter.cpp:2427–2437  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2425// Used for segwitv0/taproot sighash calculation
2426template <class T>
2427uint256 GetIssuanceSHA256(const T& txTo)
2428{
2429 CHashWriter ss(SER_GETHASH, 0);
2430 for (const auto& txin : txTo.vin) {
2431 if (txin.assetIssuance.IsNull())
2432 ss << (unsigned char)0;
2433 else
2434 ss << txin.assetIssuance;
2435 }
2436 return ss.GetSHA256();
2437}
2438
2439/** Compute the (single) SHA256 of the concatenation of all output witnesses
2440 * (rangeproof and surjection proof) in `CTxWitness`*/

Callers 2

InitMethod · 0.85
SignatureHashFunction · 0.85

Calls 2

GetSHA256Method · 0.80
IsNullMethod · 0.45

Tested by

no test coverage detected