| 2425 | // Used for segwitv0/taproot sighash calculation |
| 2426 | template <class T> |
| 2427 | uint256 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`*/ |
no test coverage detected