Browse Source

docs: fix the reverse of meaning in spec (#3387)

https://tools.ietf.org/html/rfc6962#section-2.1
"The largest power of two less than the number of items" is actually correct!

    For n > 1, let k be the largest power of two smaller than n (i.e.,
    k < n <= 2k).
pull/3392/head
YOSHIDA Masanori 6 years ago
committed by Anton Kaliaev
parent
commit
91b488f9a5
1 changed files with 1 additions and 1 deletions
  1. +1
    -1
      docs/spec/blockchain/encoding.md

+ 1
- 1
docs/spec/blockchain/encoding.md View File

@ -175,7 +175,7 @@ The differences between RFC 6962 and the simplest form a merkle tree are that:
The leaf nodes are `SHA256(0x00 || leaf_data)`, and inner nodes are `SHA256(0x01 || left_hash || right_hash)`.
2) When the number of items isn't a power of two, the left half of the tree is as big as it could be.
(The smallest power of two less than the number of items) This allows new leaves to be added with less
(The largest power of two less than the number of items) This allows new leaves to be added with less
recomputation. For example:
```


Loading…
Cancel
Save