From 2bacb91fa704af36f4c04acea19b4f1fcb2299c4 Mon Sep 17 00:00:00 2001 From: rating89us <45968869+rating89us@users.noreply.github.com> Date: Mon, 22 Feb 2021 19:55:28 +0100 Subject: [PATCH] ch06: preceding input->input from Alice's transaction; change UTXO example caption --- ch06.asciidoc | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ch06.asciidoc b/ch06.asciidoc index f28bfd53..603bee30 100644 --- a/ch06.asciidoc +++ b/ch06.asciidoc @@ -210,10 +210,10 @@ It's not just Alice's wallet that needs to retrieve UTXO referenced in the input Transactions on their own seem incomplete because they lack context. They reference UTXO in their inputs but without retrieving that UTXO we cannot know the value of the inputs or their locking conditions. When writing bitcoin software, anytime you decode a transaction with the intent of validating it or counting the fees or checking the unlocking script, your code will first have to retrieve the referenced UTXO from the blockchain in order to build the context implied but not present in the UTXO references of the inputs. For example, to calculate the amount paid in fees, you must know the sum of the values of inputs and outputs. But without retrieving the UTXO referenced in the inputs, you do not know their value. So a seemingly simple operation like counting fees in a single transaction in fact involves multiple steps and data from multiple transactions. -We can use the same sequence of commands with Bitcoin Core as we used when retrieving Alice's transaction (+getrawtransaction+ and +decoderawtransaction+). With that we can get the UTXO referenced in the preceding input and take a look: +We can use the same sequence of commands with Bitcoin Core as we used when retrieving Alice's transaction (+getrawtransaction+ and +decoderawtransaction+). With that we can get the UTXO referenced in the input from Alice's transaction and take a look: [[alice_input_tx]] -.Alice's UTXO from the previous transaction, referenced in the input +.UTXO from the previous transaction, referenced in the input from Alice's transaction [source,json] ---- "vout": [