Compute the (single) SHA256 of the concatenation of all scriptPubKeys spent by a tx. */
| 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) |
| 2491 | { |
| 2492 | CHashWriter ss(SER_GETHASH, 0); |
| 2493 | for (const auto& txout : outputs_spent) { |
| 2494 | ss << txout.scriptPubKey; |
| 2495 | } |
| 2496 | return ss.GetSHA256(); |
| 2497 | } |
| 2498 | |
| 2499 | /** Compute the vector where each element is SHA256 of scriptPubKeys spent by a tx. */ |
| 2500 | std::vector<uint256> GetSpentScriptPubKeysSHA256(const std::vector<CTxOut>& outputs_spent) |