refactor: minor changes in batch_insertion

This commit is contained in:
Magamedrasul Ibragimov 2023-04-25 20:19:34 +04:00
parent 108e791d78
commit b3a02216ce
No known key found for this signature in database
GPG Key ID: 5C8EF27B3C1DF294
1 changed files with 2 additions and 2 deletions

View File

@ -238,8 +238,8 @@ where
)?;
// Update next_index value in db
if start + leaves.len() > self.next_index {
self.next_index = start + leaves.len();
if end > self.next_index {
self.next_index = end;
self.db
.put(NEXT_INDEX_KEY, self.next_index.to_be_bytes().to_vec())?;
}