MCPcopy Create free account
hub / github.com/ElementsProject/elements / GetPrevoutsSHA256

Function GetPrevoutsSHA256

src/script/interpreter.cpp:2404–2411  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

2402/** Compute the (single) SHA256 of the concatenation of all prevouts of a tx. */
2403template <class T>
2404uint256 GetPrevoutsSHA256(const T& txTo)
2405{
2406 CHashWriter ss(SER_GETHASH, 0);
2407 for (const auto& txin : txTo.vin) {
2408 ss << txin.prevout;
2409 }
2410 return ss.GetSHA256();
2411}
2412
2413/** Compute the (single) SHA256 of the concatenation of all nSequences of a tx. */
2414template <class T>

Callers 2

InitMethod · 0.85
SignatureHashFunction · 0.85

Calls 1

GetSHA256Method · 0.80

Tested by

no test coverage detected