Compute the (single) SHA256 of the concatenation of all asset and amounts commitments spent by a tx. */ Elements TapHash only
| 2477 | /** Compute the (single) SHA256 of the concatenation of all asset and amounts commitments spent by a tx. */ |
| 2478 | // Elements TapHash only |
| 2479 | uint256 GetSpentAssetsAmountsSHA256(const std::vector<CTxOut>& outputs_spent) |
| 2480 | { |
| 2481 | CHashWriter ss(SER_GETHASH, 0); |
| 2482 | for (const auto& txout : outputs_spent) { |
| 2483 | ss << txout.nAsset; |
| 2484 | ss << txout.nValue; |
| 2485 | } |
| 2486 | return ss.GetSHA256(); |
| 2487 | } |
| 2488 | |
| 2489 | /** Compute the (single) SHA256 of the concatenation of all scriptPubKeys spent by a tx. */ |
| 2490 | uint256 GetSpentScriptsSHA256(const std::vector<CTxOut>& outputs_spent) |