Skip to content

Commit

Permalink
fix(lean-imt): replace the spread operator inside the push function w…
Browse files Browse the repository at this point in the history
…ith concat (#377)

fix(lean-imt): replace the spread operator with concat

Now the LeanIMT data structure won't return a stack error when using the inserMany function to add a
large number of members such as 110000.

re #376
  • Loading branch information
vplasencia authored Feb 24, 2025
1 parent bb5e5bb commit 32cf9a6
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/lean-imt/src/lean-imt.ts
Original file line number Diff line number Diff line change
Expand Up @@ -169,7 +169,7 @@ export default class LeanIMT<N = bigint> {

let startIndex = this.size >> 1

this._nodes[0].push(...leaves)
this._nodes[0] = this._nodes[0].concat(leaves)

// Calculate how many tree levels will need to be added
// using the number of leaves.
Expand Down

0 comments on commit 32cf9a6

Please sign in to comment.