You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
mssmt: add InsertMany method to full and compacted trees
This commit introduces the InsertMany method to both the FullTree and
CompactedTree implementations of the MS-SMT. This method allows for the
insertion of multiple leaf nodes in a single database transaction,
improving efficiency when adding multiple leaves at once.
The InsertMany method is added to the Tree interface and implemented in
both FullTree and CompactedTree. The implementation includes sum
overflow checks before each insertion and updates the root within the
transaction for consistency.
A new test case, TestInsertMany, is added to verify the functionality of the
InsertMany method in both FullTree and CompactedTree. The test inserts a
random set of leaves using InsertMany and verifies the resulting root and
retrieved leaves.
The Copy method in both FullTree and CompactedTree is updated to use
InsertMany for efficiency when copying leaves to the target tree.
0 commit comments