Skip to content
This repository was archived by the owner on Nov 15, 2023. It is now read-only.

Conversation

@davxy
Copy link
Member

@davxy davxy commented Jul 23, 2022

Apparently pending_added and pending_removed fields of LeafSet are leftovers from the past.

Previously used to construct a db transaction and introduced here: #1338

Their active usage terminates here: #5549


Fix Undo<&LeafSet>::undo_import method: old leaf should be inserted using the old number


Fix LeafSet::count: old implementation was counting the number of levels. There can be multiple leaves for each level and if the semantics is to count the number of leaves then this was not correct.

@github-actions github-actions bot added the A3-in_progress Pull request is in progress. No review needed at this stage. label Jul 23, 2022
@davxy davxy self-assigned this Jul 23, 2022
@davxy davxy requested a review from a team July 23, 2022 15:12
@davxy davxy marked this pull request as ready for review July 23, 2022 15:12
@davxy davxy added B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders. labels Jul 23, 2022
@github-actions github-actions bot added A0-please_review Pull request needs code review. and removed A3-in_progress Pull request is in progress. No review needed at this stage. labels Jul 23, 2022
davxy added 2 commits July 23, 2022 18:31
Old leaf sould be inserted using the displaced number
@davxy davxy requested a review from a team July 23, 2022 16:56
Co-authored-by: Bastian Köcher <[email protected]>
@bkchr bkchr merged commit 618f26b into master Jul 25, 2022
@bkchr bkchr deleted the davxy/remove-unused-db-leaves-field branch July 25, 2022 10:19
DaviRain-Su pushed a commit to octopus-network/substrate that referenced this pull request Aug 23, 2022
* Remove unused leaves-set fields

* Fix undo_import method

Old leaf sould be inserted using the displaced number

* Fix leaves count

* Apply code review suggestions

Co-authored-by: Bastian Köcher <[email protected]>

Co-authored-by: Bastian Köcher <[email protected]>
ark0f pushed a commit to gear-tech/substrate that referenced this pull request Feb 27, 2023
* Remove unused leaves-set fields

* Fix undo_import method

Old leaf sould be inserted using the displaced number

* Fix leaves count

* Apply code review suggestions

Co-authored-by: Bastian Köcher <[email protected]>

Co-authored-by: Bastian Köcher <[email protected]>
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

A0-please_review Pull request needs code review. B0-silent Changes should not be mentioned in any release notes C1-low PR touches the given topic and has a low impact on builders.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants