Compute the (single) SHA256 of the concatenation of all scriptPubKeys spent by a tx. */
| 1398 | |
| 1399 | /** Compute the (single) SHA256 of the concatenation of all scriptPubKeys spent by a tx. */ |
| 1400 | uint256 GetSpentScriptsSHA256(const std::vector<CTxOut>& outputs_spent) |
| 1401 | { |
| 1402 | HashWriter ss{}; |
| 1403 | for (const auto& txout : outputs_spent) { |
| 1404 | ss << txout.scriptPubKey; |
| 1405 | } |
| 1406 | return ss.GetSHA256(); |
| 1407 | } |
| 1408 | |
| 1409 | |
| 1410 | } // namespace |