From 33402f685d53ef8c19fd95121cfc2b7f1d179eb0 Mon Sep 17 00:00:00 2001 From: "David A. Harding" Date: Sun, 5 Feb 2023 12:59:49 -1000 Subject: [PATCH] Anchors: rename "cup_of_coffee" to "spending_bitcoin" --- ch02.asciidoc | 2 +- ch03.asciidoc | 2 +- ch07.asciidoc | 2 +- ch10.asciidoc | 2 +- 4 files changed, 4 insertions(+), 4 deletions(-) diff --git a/ch02.asciidoc b/ch02.asciidoc index c1bd8290..2f6ebd92 100644 --- a/ch02.asciidoc +++ b/ch02.asciidoc @@ -64,7 +64,7 @@ own transactions, the operator may be able to guess how many bitcoins you've received, spent, and currently own. ==== -[[bitcoin_e_commerce]] +[[spending_bitcoin]] ==== Buying from an Online Store Alice, introduced in the previous chapter, is a new user who has just diff --git a/ch03.asciidoc b/ch03.asciidoc index eec4f0a2..1de55fc5 100644 --- a/ch03.asciidoc +++ b/ch03.asciidoc @@ -753,7 +753,7 @@ blocks from other Bitcoin clients. You can check its progress using transactions")))((("transactions", "exploring with Bitcoin Core API")))Commands: +getrawtransaction+, +decoderawtransaction+ -In <>, ((("use cases", "buying coffee", +In <>, ((("use cases", "buying coffee", id="alicethree")))Alice made a purchase from Bob's store. Her transaction was recorded on the blockchain. Let's use the API to retrieve and examine that transaction by passing diff --git a/ch07.asciidoc b/ch07.asciidoc index 73ee28fa..5e9d9490 100644 --- a/ch07.asciidoc +++ b/ch07.asciidoc @@ -696,7 +696,7 @@ Let’s look at some of our example transactions and see how they would change w [[p2wpkh]] ===== Pay-to-Witness-Public-Key-Hash (P2WPKH) -In <>, ((("use cases", "buying coffee", id="aliced")))Alice created a transaction to pay Bob for a cup of coffee. That transaction created a P2PKH output with a value of 0.015 BTC that was spendable by Bob. The output’s script looks like this: +In <>, ((("use cases", "buying coffee", id="aliced")))Alice created a transaction to pay Bob for a cup of coffee. That transaction created a P2PKH output with a value of 0.015 BTC that was spendable by Bob. The output’s script looks like this: .Example P2PKH output script ---- diff --git a/ch10.asciidoc b/ch10.asciidoc index 6dac540f..4bbd4769 100644 --- a/ch10.asciidoc +++ b/ch10.asciidoc @@ -138,7 +138,7 @@ Jing's node is listening for new blocks, propagated on the Bitcoin network, as d ((("mining and consensus", "aggregating transactions into blocks", id="MACaggreg10")))((("transactions", "aggregating into blocks", id="Taggreg10")))((("blocks", "aggregating transactions into", id="Baggreg10")))((("blocks", "candidate blocks")))((("candidate blocks")))((("transaction pools")))((("memory pools (mempools)")))After validating transactions, a Bitcoin node will add them to the _memory pool_, or _transaction pool_, where transactions await until they can be included (mined) into a block. Jing's node collects, validates, and relays new transactions just like any other node. Unlike other nodes, however, Jing's node will then aggregate these transactions into a _candidate block_. -Let's follow the blocks that were created during the time Alice bought a cup of coffee from Bob's Cafe (see <>). Alice's transaction was included in block 277,316. For the purpose of demonstrating the concepts in this chapter, let's assume that block was mined by Jing's mining system and follows Alice's transaction as it becomes part of this new block. +Let's follow the blocks that were created during the time Alice bought a cup of coffee from Bob's Cafe (see <>). Alice's transaction was included in block 277,316. For the purpose of demonstrating the concepts in this chapter, let's assume that block was mined by Jing's mining system and follows Alice's transaction as it becomes part of this new block. Jing's mining node maintains a local copy of the blockchain. By the time ((("use cases", "buying coffee")))Alice buys the cup of coffee, Jing's node has assembled a chain up to block 277,314. Jing's node is listening for transactions, trying to mine a new block and also listening for blocks discovered by other nodes. As Jing's node is mining, it receives block 277,315 through the Bitcoin network. The arrival of this block signifies the end of the competition for block 277,315 and the beginning of the competition to create block 277,316.