Update 8_2_Building_a_Bitcoin_Script_with_P2SH.md

This commit is contained in:
Shannon Appelcline 2017-05-25 13:49:48 -07:00 committed by GitHub
parent 4ebc069ff1
commit a9093c2e3b

View File

@ -11,6 +11,7 @@ To lock a transaction with this Script, do the following:
1. Serialize `OP_ADD 99 OP_EQUAL`: 1. Serialize `OP_ADD 99 OP_EQUAL`:
1. OP_ADD = 0x93 — a simple opcode translation 1. OP_ADD = 0x93 — a simple opcode translation
2. 99 = 0x01, 0x63 — this opcode pushes one byte onto the stack, 99 (hex: 0x63) 2. 99 = 0x01, 0x63 — this opcode pushes one byte onto the stack, 99 (hex: 0x63)
* No worries about endian conversion because it's only one byte
3. OP_EQUAL = 0x87 — a simple opcode translation 3. OP_EQUAL = 0x87 — a simple opcode translation
4. `<serialized99Equal>` = "93016387" 4. `<serialized99Equal>` = "93016387"
2. SHA-256 and RIPEMD-160 hash the serialized script. 2. SHA-256 and RIPEMD-160 hash the serialized script.