Splits the path leading to the given generalized tree index at the specified height and returns the index at the given height. If the height of the given index is less than the specified level then the original index is returned.
(index: U256, level: Uint)
| 144 | |
| 145 | |
| 146 | def gti_split_below(index: U256, level: Uint) -> U256: |
| 147 | """ |
| 148 | Splits the path leading to the given generalized tree index at the |
| 149 | specified height and returns the index at the given height. If the height |
| 150 | of the given index is less than the specified level then the original |
| 151 | index is returned. |
| 152 | """ |
| 153 | height = gti_height(index) |
| 154 | if height > level: |
| 155 | index >>= height - level |
| 156 | return index |
| 157 | |
| 158 | |
| 159 | def gti_split_above(index: U256, level: Uint) -> U256: |
no test coverage detected