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

Method GetUniqueID

src/psbt.cpp:190–205  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

188}
189
190uint256 PartiallySignedTransaction::GetUniqueID() const
191{
192 if (tx != std::nullopt) {
193 return tx->GetHash();
194 }
195
196 // Get the unsigned transaction
197 CMutableTransaction mtx = GetUnsignedTx(/* force_unblinded */ true);
198 // Set the locktime to 0
199 mtx.nLockTime = 0;
200 // Set the sequence numbers to 0
201 for (CTxIn& txin : mtx.vin) {
202 txin.nSequence = 0;
203 }
204 return mtx.GetHash();
205}
206
207bool PartiallySignedTransaction::AddInput(PSBTInput& psbtin)
208{

Callers 1

MergeMethod · 0.80

Calls 1

GetHashMethod · 0.45

Tested by

no test coverage detected