Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion ch11.asciidoc
Original file line number Diff line number Diff line change
Expand Up @@ -285,7 +285,7 @@ include::code-ch11/examples.py[tag=example5]
----
<1> Since we halve at every level, log~2~ of the number of leaves is how many levels there are in the Merkle tree.
Note we round up using `math.ceil` as we round up for halving at each level.
We could also be clever and use `len(bin(total))-2`.
We could also be clever and use `len(bin(total))-3`.
<2> The Merkle tree will hold the root level at index 0, the level below at index 1, and so on.
In other words, the index is the "depth" from the top.
<3> There are levels 0 to `max_depth` in this Merkle tree.
Expand Down