Skip to content

Commit 11e73be

Browse files
committed
natspec
1 parent db1b3fe commit 11e73be

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

src/test/unit/libraries/Merkle.t.sol

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -6,14 +6,10 @@ import "src/contracts/libraries/Merkle.sol";
66
import "src/test/utils/Murky.sol";
77

88
abstract contract MerkleBaseTest is Test, MurkyBase {
9-
/// @dev Whether to use Keccak or Sha256 for tree + proof generation.
10-
bool usingSha;
11-
/// @notice The contents of the merkle tree (unsorted).
12-
bytes32[] leaves;
13-
/// @notice The root of the merkle tree.
14-
bytes32 root;
15-
/// @notice The proofs for each leaf in the tree.
16-
bytes[] proofs;
9+
bool usingSha; // Whether to use Keccak or Sha256 for tree + proof generation.
10+
bytes32[] leaves; // The contents of the merkle tree (unsorted).
11+
bytes32 root; // The root of the merkle tree.
12+
bytes[] proofs; // The proofs for each leaf in the tree.
1713

1814
/// -----------------------------------------------------------------------
1915
/// Keccak + Sha256 Tests
@@ -101,7 +97,8 @@ contract MerkleKeccakTest is MerkleBaseTest, MerkleKeccak {
10197
// Merkle.merkleizeKeccak pads to next power of 2, so we need to match that.
10298
uint numLeaves = nextPowerOf2(leaves.length);
10399
bytes32[] memory paddedLeaves = new bytes32[](numLeaves);
104-
for (uint i = 0; i < leaves.length; ++i) { // TODO: Point leaves to paddedLeaves using assembly to avoid loop.
100+
for (uint i = 0; i < leaves.length; ++i) {
101+
// TODO: Point leaves to paddedLeaves using assembly to avoid loop.
105102
paddedLeaves[i] = leaves[i];
106103
}
107104

0 commit comments

Comments
 (0)