From 9a4ca75610140693764093df405354241d95f12d Mon Sep 17 00:00:00 2001 From: Cragin Godley Date: Mon, 20 Oct 2014 01:27:29 -0400 Subject: [PATCH] "merkle tree is a binary tree" does not automatically imply that it "needs an even number of leaf nodes". Valid binary trees may contain an odd number of leaf nodes. --- ch07.asciidoc | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/ch07.asciidoc b/ch07.asciidoc index c09e72c9..37350fb0 100644 --- a/ch07.asciidoc +++ b/ch07.asciidoc @@ -171,7 +171,7 @@ The process continues until there is only one node at the top, the node known as .Calculating the nodes in a Merkle Tree image::images/MerkleTree.png["merkle_tree"] -Since the merkle tree is a binary tree, it needs an even number of leaf nodes. If there is an odd number of transactions to summarize, the last transaction hash will be duplicated to create an even number of leaf nodes, also known as a _balanced tree_. This is shown in the example below, where transaction C is duplicated: +If there is an odd number of transactions to summarize, the last transaction hash will be duplicated to create an even number of leaf nodes, also known as a _balanced tree_. This is shown in the example below, where transaction C is duplicated: [[merkle_tree_odd]] .An even number of data elements, by duplicating one data element