mirror of
https://github.com/ethereum/go-ethereum.git
synced 2026-08-20 10:52:25 +00:00
reorder funcs, and add comment
This commit is contained in:
parent
c0ca60b3f4
commit
3749412604
1 changed files with 3 additions and 0 deletions
|
|
@ -563,6 +563,9 @@ func reachedPath(path, target []byte) bool {
|
||||||
return bytes.Compare(path, target) >= 0
|
return bytes.Compare(path, target) >= 0
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// A value embedded in a fullNode occupies its last child slot, but we want to visit it last to
|
||||||
|
// produce a pre-order traversal. These two functions handle the ordering by mapping index 0 to the
|
||||||
|
// value, and shifting the indices of children over by 1.
|
||||||
func prevChildIndex(index int) int {
|
func prevChildIndex(index int) int {
|
||||||
switch index {
|
switch index {
|
||||||
case 0:
|
case 0:
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue