-
Notifications
You must be signed in to change notification settings - Fork 2.7k
Update Pallet Bags List to use ListError
#11342
Conversation
frame/bags-list/src/lib.rs
Outdated
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 }); |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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...
There was a problem hiding this 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.
Besides the event above (which I removed), what else? |
There was a problem hiding this 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>
bot merge |
Waiting for commit status. |
Merge cancelled due to error. Error: Statuses failed for a7e5623 |
bot merge |
Error: "Check reviews" status is not passing for paritytech/polkadot#5443 |
* 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>
* 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>
* 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>
Extracting a consolidated piece of: https://github.com/paritytech/substrate/pull/11013/files#
polkadot companion: paritytech/polkadot#5443