Skip to content

Commit 5099eeb

Browse files
author
Beau Shinkle
committed
Clarify how leaves indexing works
1 parent adda0ea commit 5099eeb

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

contracts/SortitionTree.sol

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,8 +41,8 @@ contract SortitionTree {
4141
// branches[2][6]. Mappings are used in place of arrays for efficiency.
4242
mapping(uint256 => mapping(uint256 => uint256)) internal branches;
4343

44-
// A mapping from index => leaf, acting as an array. For example, to access
45-
// the 42nd (0-index) leaf, call leaves[42].
44+
// A 0-index mapping from index => leaf, acting as an array. For example, to
45+
// access the 42nd leaf, call leaves[41].
4646
mapping(uint256 => uint256) internal leaves;
4747

4848
// the flagged (see setFlag() and unsetFlag() in Position.sol) positions

0 commit comments

Comments
 (0)