leafs = 2**(levels - 1)

This commit is contained in:
Alexey 2019-09-11 11:25:32 +03:00
parent 3404acef48
commit 0689d76df1
2 changed files with 3 additions and 3 deletions

View file

@ -58,7 +58,7 @@ contract MerkleTreeWithHistory {
function _insert(uint256 leaf) internal {
uint32 current_index = next_index;
require(current_index != 2**(levels - 1), "Merkle tree is full");
require(current_index != 2**(levels - 1), "Merkle tree is full. No more leafs can be added");
next_index += 1;
uint256 current_level_hash = leaf;
uint256 left;