MCPcopy Create free account
hub / github.com/bitcoin/bitcoin / GetOutputsSHA256

Function GetOutputsSHA256

src/script/interpreter.cpp:1380–1387  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1378/** Compute the (single) SHA256 of the concatenation of all txouts of a tx. */
1379template <class T>
1380uint256 GetOutputsSHA256(const T& txTo)
1381{
1382 HashWriter ss{};
1383 for (const auto& txout : txTo.vout) {
1384 ss << txout;
1385 }
1386 return ss.GetSHA256();
1387}
1388
1389/** Compute the (single) SHA256 of the concatenation of all amounts spent by a tx. */
1390uint256 GetSpentAmountsSHA256(const std::vector<CTxOut>& outputs_spent)

Callers 2

InitMethod · 0.85
SignatureHashFunction · 0.85

Calls 1

GetSHA256Method · 0.80

Tested by

no test coverage detected