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

Update Pallet Bags List to use ListError #11342

Merged
merged 9 commits into from
May 3, 2022

Conversation

shawntabrizi
Copy link
Member

@shawntabrizi shawntabrizi commented May 3, 2022

Extracting a consolidated piece of: https://github.com/paritytech/substrate/pull/11013/files#

polkadot companion: paritytech/polkadot#5443

@github-actions github-actions bot added the A0-please_review Pull request needs code review. label May 3, 2022
if let Some((from, to)) = maybe_movement {
Self::deposit_event(Event::<T, I>::Rebagged { who: account.clone(), from, to });
};
maybe_movement
Self::deposit_event(Event::<T, I>::ScoreUpdated { who: account.clone(), new_score });
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

to be clear, this event is currently non-existent, because we don't have the notion of a "stored score" yet. That should come in your next PR.

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably this event is being emitted in the wrong place then...

Copy link
Contributor

@kianenigma kianenigma left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think it might be better to bring all bags-list changes alltogether in this PR, since some things don't make sense alone. Nonetheless look good in its current shape as well.

@shawntabrizi
Copy link
Member Author

some things don't make sense alone

Besides the event above (which I removed), what else?

@shawntabrizi shawntabrizi 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. D5-nicetohaveaudit ⚠️ PR contains trivial changes to logic that should be properly reviewed. labels May 3, 2022
@shawntabrizi shawntabrizi added this to In progress in Runtime via automation May 3, 2022
frame/bags-list/src/lib.rs Outdated Show resolved Hide resolved
Runtime automation moved this from In progress to Needs Audit May 3, 2022
Copy link
Contributor

@KiChjang KiChjang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can merge after fixing some small nits.

Co-authored-by: Keith Yeung <kungfukeith11@gmail.com>
@shawntabrizi
Copy link
Member Author

bot merge

@paritytech-processbot
Copy link

Waiting for commit status.

@paritytech-processbot
Copy link

Merge cancelled due to error. Error: Statuses failed for a7e5623

@shawntabrizi
Copy link
Member Author

bot merge

@paritytech-processbot
Copy link

Error: "Check reviews" status is not passing for paritytech/polkadot#5443

@shawntabrizi shawntabrizi merged commit cfb5bc6 into master May 3, 2022
@shawntabrizi shawntabrizi deleted the shawntabrizi-bags-list-list-error branch May 3, 2022 22:13
Runtime automation moved this from Needs Audit to Done May 3, 2022
@shawntabrizi shawntabrizi moved this from Done to Archive in Runtime May 5, 2022
godcodehunter pushed a commit to sensoriumxr/substrate that referenced this pull request Jun 22, 2022
* extract list error changes from kiz-revamp-sorted-list-providers-2-approval-stake

* some fixes

* weight -> score

* Update tests.rs

* Update tests.rs

* more fixes

* remove score updated event

* Update frame/bags-list/src/lib.rs

Co-authored-by: Keith Yeung <kungfukeith11@gmail.com>

Co-authored-by: Keith Yeung <kungfukeith11@gmail.com>
DaviRain-Su pushed a commit to octopus-network/substrate that referenced this pull request Aug 23, 2022
* extract list error changes from kiz-revamp-sorted-list-providers-2-approval-stake

* some fixes

* weight -> score

* Update tests.rs

* Update tests.rs

* more fixes

* remove score updated event

* Update frame/bags-list/src/lib.rs

Co-authored-by: Keith Yeung <kungfukeith11@gmail.com>

Co-authored-by: Keith Yeung <kungfukeith11@gmail.com>
ark0f pushed a commit to gear-tech/substrate that referenced this pull request Feb 27, 2023
* extract list error changes from kiz-revamp-sorted-list-providers-2-approval-stake

* some fixes

* weight -> score

* Update tests.rs

* Update tests.rs

* more fixes

* remove score updated event

* Update frame/bags-list/src/lib.rs

Co-authored-by: Keith Yeung <kungfukeith11@gmail.com>

Co-authored-by: Keith Yeung <kungfukeith11@gmail.com>
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. D5-nicetohaveaudit ⚠️ PR contains trivial changes to logic that should be properly reviewed.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants