This commit is contained in:
poma 2021-03-20 23:50:59 +03:00
parent 87ce87532e
commit a3da216e03
No known key found for this signature in database
GPG Key ID: BA20CB01FE165657
1 changed files with 1 additions and 0 deletions

View File

@ -21,6 +21,7 @@ template TreeLayer(height) {
// Inserts a leaf batch into a tree
// Checks that tree previously contained zero leaves in the same position
// Hashes leaves with Poseidon hash
// `batchLevels` should be less than `levels`
template BatchTreeUpdate(levels, batchLevels, zeroBatchLeaf) {
var height = levels - batchLevels;
var nLeaves = 1 << batchLevels;