1
0
mirror of https://github.com/bitcoinbook/bitcoinbook synced 2025-04-16 07:15:57 +00:00

Made changes to ch05.asciidoc

This commit is contained in:
myarbrough@oreilly.com 2014-11-18 08:02:48 -08:00
parent f0654d7b6e
commit 0eaec118ca

View File

@ -421,14 +421,17 @@ The general form of a locking script setting an M-of-N multi-signature condition
----
M <Public Key 1> <Public Key 2> ... <Public Key N> N OP_CHECKMULTISIG
----
where N is the total number of listed public keys and M is the threshold of required signatures to spend the output.
A locking script setting a 2-of-3 multi-signature condition looks like this:
----
2 <Public Key A> <Public Key B> <Public Key C> 3 OP_CHECKMULTISIG
----
The preceding locking script can be satisfied with an unlocking script containing pairs of signatures and public keys:
----
OP_0 <Signature B> <Signature C>
----
@ -441,8 +444,8 @@ or any combination of two signatures from the private keys corresponding to the
The two scripts together would form the combined validation script:
----
OP_0 <Signature B> <Signature C>
2 <Public Key A> <Public Key B> <Public Key C> 3 OP_CHECKMULTISIG
OP_0 <Signature B> <Signature C> 2 <Public Key A> <Public Key B> <Public Key C> 3 OP_CHECKMULTISIG
----
When executed, this combined script will evaluate to TRUE if, and only if, the unlocking script matches the conditions set by the locking script. In this case, the condition is whether the unlocking script has a valid signature from the two private keys that correspond to two of the three public keys set as an encumbrance.