mirror of
https://github.com/bitcoinbook/bitcoinbook
synced 2025-03-28 21:35:51 +00:00
Made changes to ch07.asciidoc
This commit is contained in:
parent
348cd899da
commit
20400a6259
@ -145,9 +145,6 @@ The bitcoin node then receives a new block from the network, which it parses as
|
|||||||
|
|
||||||
Looking at this new block, the node finds the +previousblockhash+ field, which contains the hash of its parent block. It is a hash known to the node, that of the last block on the chain at height 277,314. Therefore, this new block is a child of the last block on the chain and extends the existing blockchain. The node adds this new block to the end of the chain, making the blockchain longer with a new height of 277,315. <<chain_of_blocks>> shows the chain of three blocks, linked by references in the +previousblockhash+ field.
|
Looking at this new block, the node finds the +previousblockhash+ field, which contains the hash of its parent block. It is a hash known to the node, that of the last block on the chain at height 277,314. Therefore, this new block is a child of the last block on the chain and extends the existing blockchain. The node adds this new block to the end of the chain, making the blockchain longer with a new height of 277,315. <<chain_of_blocks>> shows the chain of three blocks, linked by references in the +previousblockhash+ field.
|
||||||
|
|
||||||
[[chain_of_blocks]]
|
|
||||||
.Blocks linked in a chain, by reference to the previous block header hash
|
|
||||||
image::images/msbt_0701.png[scale="50"]
|
|
||||||
|
|
||||||
[[merkle_trees]]
|
[[merkle_trees]]
|
||||||
=== Merkle Trees
|
=== Merkle Trees
|
||||||
@ -174,6 +171,10 @@ H~AB~ = SHA256(SHA256(H~A~ + H~B~))
|
|||||||
|
|
||||||
The process continues until there is only one node at the top, the node known as the Merkle root. That 32-byte hash is stored in the block header and summarizes all the data in all four transactions.
|
The process continues until there is only one node at the top, the node known as the Merkle root. That 32-byte hash is stored in the block header and summarizes all the data in all four transactions.
|
||||||
|
|
||||||
|
[[chain_of_blocks]]
|
||||||
|
.Blocks linked in a chain, by reference to the previous block header hash
|
||||||
|
image::images/msbt_0701.png[scale="50"]
|
||||||
|
|
||||||
[[simple_merkle]]
|
[[simple_merkle]]
|
||||||
.Calculating the nodes in a merkle tree
|
.Calculating the nodes in a merkle tree
|
||||||
image::images/msbt_0702.png["merkle_tree"]
|
image::images/msbt_0702.png["merkle_tree"]
|
||||||
|
Loading…
Reference in New Issue
Block a user