Skip to content
This repository has been archived by the owner on May 23, 2024. It is now read-only.

Simplification of insertion & pruning code #123

Merged
merged 2 commits into from
Nov 18, 2021
Merged

Simplification of insertion & pruning code #123

merged 2 commits into from
Nov 18, 2021

Conversation

tomusdrw
Copy link

Related: https://github.com/paritytech/substrate/pull/9700/files

Please take a look at my take on peaks and elems processing loop.
This approach avoids unnecessary allocations and extra iterations by leveraging iterators

Also using NodeIndex in context of leaf_indices is confusing, hence I've introduced an extra type.

CC @adoerr

@AurevoirXavier AurevoirXavier merged commit a6903e1 into darwinia-network:xavier-mmr-pruning Nov 18, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants