mirror of
https://github.com/bitcoinbook/bitcoinbook
synced 2025-01-22 13:40:58 +00:00
Made changes to ch05.asciidoc
This commit is contained in:
parent
2ca656f3da
commit
34a8e550a4
@ -279,9 +279,9 @@ In the original bitcoin client, the unlocking and locking scripts were concatena
|
|||||||
|
|
||||||
First, the unlocking script is executed, using the stack execution engine. If the unlocking script executed without errors (e.g., it has no "dangling" operators left over), the main stack (not the alternate stack) is copied and the locking script is executed. If the result of executing the locking script with the stack data copied from the unlocking script is "TRUE," the unlocking script has succeeded in resolving the conditions imposed by the locking script and, therefore, the input is a valid authorization to spend the UTXO. If any result other than "TRUE" remains after execution of the combined script, the input is invalid because it has failed to satisfy the spending conditions placed on the UTXO. Note that the UTXO is permanently recorded in the blockchain, and therefore is invariable and is unaffected by failed attempts to spend it by reference in a new transaction. Only a valid transaction that correctly satisfies the conditions of the UTXO results in the UTXO being marked as "spent" and removed from the set of available (unspent) UTXO.
|
First, the unlocking script is executed, using the stack execution engine. If the unlocking script executed without errors (e.g., it has no "dangling" operators left over), the main stack (not the alternate stack) is copied and the locking script is executed. If the result of executing the locking script with the stack data copied from the unlocking script is "TRUE," the unlocking script has succeeded in resolving the conditions imposed by the locking script and, therefore, the input is a valid authorization to spend the UTXO. If any result other than "TRUE" remains after execution of the combined script, the input is invalid because it has failed to satisfy the spending conditions placed on the UTXO. Note that the UTXO is permanently recorded in the blockchain, and therefore is invariable and is unaffected by failed attempts to spend it by reference in a new transaction. Only a valid transaction that correctly satisfies the conditions of the UTXO results in the UTXO being marked as "spent" and removed from the set of available (unspent) UTXO.
|
||||||
|
|
||||||
<<scriptSig and scriptPubKey>> is an example of the unlocking and locking scripts for the most common type of bitcoin transaction (a payment to a public key hash), showing the combined script resulting from the concatenation of the unlocking and locking scripts prior to script validation.
|
<<scriptSig_and_scriptPubKey>> is an example of the unlocking and locking scripts for the most common type of bitcoin transaction (a payment to a public key hash), showing the combined script resulting from the concatenation of the unlocking and locking scripts prior to script validation.
|
||||||
|
|
||||||
[[scriptSig and scriptPubKey]]
|
[[scriptSig_and_scriptPubKey]]
|
||||||
.Combining scriptSig and scriptPubKey to evaluate a transaction script
|
.Combining scriptSig and scriptPubKey to evaluate a transaction script
|
||||||
image::images/msbt_0501.png["scriptSig_and_scriptPubKey"]
|
image::images/msbt_0501.png["scriptSig_and_scriptPubKey"]
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user