File tree Expand file tree Collapse file tree 1 file changed +6
-9
lines changed
Expand file tree Collapse file tree 1 file changed +6
-9
lines changed Original file line number Diff line number Diff line change @@ -6,14 +6,10 @@ import "src/contracts/libraries/Merkle.sol";
66import "src/test/utils/Murky.sol " ;
77
88abstract 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
You can’t perform that action at this time.
0 commit comments