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

Method GetHash

src/primitives/txwitness.cpp:16–24  ·  view source on GitHub ↗

* The input witness consists of four elements, three of which are * optional. The optional elements have to do with asset issuance * and peg-in transactions, nor present most of the time. * */

Source from the content-addressed store, hash-verified

14 *
15 */
16uint256 CTxInWitness::GetHash() const
17{
18 std::vector<uint256> leaves;
19 leaves.push_back(SerializeHash(vchIssuanceAmountRangeproof, SER_GETHASH, 0));
20 leaves.push_back(SerializeHash(vchInflationKeysRangeproof, SER_GETHASH, 0));
21 leaves.push_back(SerializeHash(scriptWitness.stack, SER_GETHASH, 0));
22 leaves.push_back(SerializeHash(m_pegin_witness.stack, SER_GETHASH, 0));
23 return ComputeFastMerkleRoot(leaves);
24}
25
26/**
27 * The output witness consists of two elements: the surjection proof and

Callers

nothing calls this directly

Calls 3

SerializeHashFunction · 0.85
ComputeFastMerkleRootFunction · 0.85
push_backMethod · 0.45

Tested by

no test coverage detected