mirror of
https://github.com/ElementsProject/elements.git
synced 2026-08-15 12:51:00 +02:00
Implement SequenceLocks functions
SequenceLocks functions are used to evaluate sequence lock times or heights per BIP 68. The majority of this code is copied from maaku in #6312 Further credit: btcdrak, sipa, NicolasDorier
This commit is contained in:
parent
dc0305d15a
commit
c6c2f0fd78
10 changed files with 300 additions and 49 deletions
|
|
@ -63,7 +63,7 @@ CMutableTransaction BuildCreditingTransaction(const CScript& scriptPubKey)
|
|||
txCredit.vout.resize(1);
|
||||
txCredit.vin[0].prevout.SetNull();
|
||||
txCredit.vin[0].scriptSig = CScript() << CScriptNum(0) << CScriptNum(0);
|
||||
txCredit.vin[0].nSequence = std::numeric_limits<unsigned int>::max();
|
||||
txCredit.vin[0].nSequence = CTxIn::SEQUENCE_FINAL;
|
||||
txCredit.vout[0].scriptPubKey = scriptPubKey;
|
||||
txCredit.vout[0].nValue = 0;
|
||||
|
||||
|
|
@ -80,7 +80,7 @@ CMutableTransaction BuildSpendingTransaction(const CScript& scriptSig, const CMu
|
|||
txSpend.vin[0].prevout.hash = txCredit.GetHash();
|
||||
txSpend.vin[0].prevout.n = 0;
|
||||
txSpend.vin[0].scriptSig = scriptSig;
|
||||
txSpend.vin[0].nSequence = std::numeric_limits<unsigned int>::max();
|
||||
txSpend.vin[0].nSequence = CTxIn::SEQUENCE_FINAL;
|
||||
txSpend.vout[0].scriptPubKey = CScript();
|
||||
txSpend.vout[0].nValue = 0;
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue