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

Remove unrequired check #14298

Merged
merged 2 commits into from
Jun 4, 2023
Merged

Conversation

gilescope
Copy link
Contributor

The get_pool_account function no longer relies on a _truncating function when creating the account (which could have lead to pool collisions), and there is a test in place
should someone alter the function in the future to something that created pool collisions.

I don't think this check is helpful any longer and it's now inaccurate as there's now no reason for the account type to be at least u128.

Fixes issues brought to attention in #14289.

The get_pool_account function no longer relies on a `_trucating` function,
and there is a test in place
should someone alter the function to create pool collisions.
@gilescope gilescope requested review from a team June 3, 2023 10:39
@gilescope gilescope added 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. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit labels Jun 3, 2023
Copy link
Contributor

@jsidorenko jsidorenko left a comment

Choose a reason for hiding this comment

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

yay 👍

@gilescope
Copy link
Contributor Author

gilescope commented Jun 4, 2023 via email

Copy link
Member

@ggwpez ggwpez left a comment

Choose a reason for hiding this comment

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

The check is also on lib.rs when it imports the module. It’s nicer if the
check is at the lib.rs level as rustc won’t load that file from disk and
also any changes to that file won’t trigger incremental compilation
dirtying (unless the feature is activated)

Did not know this, thanks!

@gilescope
Copy link
Contributor Author

bot merge

@paritytech-processbot
Copy link

Waiting for commit status.

@paritytech-processbot
Copy link

Merge cancelled due to error. Error: Statuses failed for 43adad4

@gilescope
Copy link
Contributor Author

bot merge

@paritytech-processbot paritytech-processbot bot merged commit b512933 into master Jun 4, 2023
@paritytech-processbot paritytech-processbot bot deleted the giles-remove-unneeded-check branch June 4, 2023 21:17
nathanwhit pushed a commit to nathanwhit/substrate that referenced this pull request Jul 19, 2023
* Remove unrequired check

The get_pool_account function no longer relies on a `_trucating` function,
and there is a test in place
should someone alter the function to create pool collisions.

* test needed in this case.
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. D3-trivial 🧸 PR contains trivial changes in a runtime directory that do not require an audit
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants