mirror of
https://github.com/ChristopherA/Learning-Bitcoin-from-the-Command-Line.git
synced 2025-06-08 00:16:26 +00:00
Update 8_3_Running_a_Bitcoin_Script_with_P2SH.md
This commit is contained in:
parent
b5b6d232c9
commit
1133ccc212
@ -46,12 +46,14 @@ Script: OP_HASH160 <hashed99Equal> OP_EQUAL
|
||||
Stack: [ 1 98 <serialized99Equal> ]
|
||||
|
||||
Script: <hashed99Equal> OP_EQUAL
|
||||
Running: <serialized99Equal> OP_HASH160
|
||||
Stack: [ 1 98 <hashed99Equal> ]
|
||||
|
||||
Script: OP_EQUAL
|
||||
Stack: [ 1 98 <hashed99Equal> <hashed99Equal> ]
|
||||
|
||||
Script:
|
||||
Running: <hashed99Equal> <hashed99Equal> OP_EQUAL
|
||||
Stack: [ 1 98 True ]
|
||||
```
|
||||
The Script ends with a `True` on top of the stack, and so it succeeds ... even though there's other cruft below it.
|
||||
@ -73,12 +75,14 @@ Script: OP_ADD 99 OP_EQUAL
|
||||
Stack: [ 1 98 ]
|
||||
|
||||
Script: 99 OP_EQUAL
|
||||
Running: 1 98 OP_ADD
|
||||
Stack: [ 99 ]
|
||||
|
||||
Script: OP_EQUAL
|
||||
Stack: [ 99 99 ]
|
||||
|
||||
Script:
|
||||
Running: 99 99 OP_EQUAL
|
||||
Stack: [ True ]
|
||||
```
|
||||
With that second validation _also_ true, the UTXO can now be spent!
|
||||
|
Loading…
x
Reference in New Issue
Block a user