mirror of
https://github.com/bitcoin/bips.git
synced 2026-07-13 17:56:00 +00:00
BIP112/114 example fix
This commit is contained in:
@@ -96,20 +96,20 @@ The following is the "Hashed TIme-Lock Contract" example in [[bip-0112.mediawiki
|
||||
IF
|
||||
"24h" CHECKSEQUENCEVERIFY
|
||||
2DROP
|
||||
<Alice key hash>
|
||||
<Alice's pubkey>
|
||||
ELSE
|
||||
<Commit-Revocation-Hash> EQUAL
|
||||
NOTIF
|
||||
"Timestamp" CHECKLOCKTIMEVERIFY DROP
|
||||
ENDIF
|
||||
<Bob key hash>
|
||||
<Bob's pubkey>
|
||||
ENDIF
|
||||
CHECKSIG
|
||||
|
||||
To create a MAST Root, it is flattened to 3 mutually exclusive branches:
|
||||
HASH160 <R-HASH> EQUALVERIFY "24h" CHECKSEQUENCEVERIFY DROP <Alice key hash> CHECKSIG
|
||||
HASH160 <Commit-Revocation-Hash> EQUALVERIFY <Bob key hash> CHECKSIG
|
||||
"Timestamp" CHECKLOCKTIMEVERIFY DROP <Bob key hash> CHECKSIG
|
||||
HASH160 <R-HASH> EQUALVERIFY "24h" CHECKSEQUENCEVERIFY DROP <Alice's pubkey> CHECKSIG
|
||||
HASH160 <Commit-Revocation-Hash> EQUALVERIFY <Bob's pubkey> CHECKSIG
|
||||
"Timestamp" CHECKLOCKTIMEVERIFY DROP <Bob's pubkey> CHECKSIG
|
||||
|
||||
which significantly improves readability and reduces the witness size when it is redeemed.
|
||||
|
||||
|
||||
Reference in New Issue
Block a user