-
Notifications
You must be signed in to change notification settings - Fork 4.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Do not derive Copy for EpochSchedule and Rent #32767
Conversation
Codecov Report
Additional details and impacted files@@ Coverage Diff @@
## master #32767 +/- ##
=========================================
- Coverage 81.9% 81.9% -0.1%
=========================================
Files 819 819
Lines 219129 219131 +2
=========================================
- Hits 179532 179498 -34
- Misses 39597 39633 +36 |
@@ -1470,7 +1470,7 @@ impl Bank { | |||
); | |||
} else { | |||
// Save a snapshot of stakes for use in consensus and stake weighted networking | |||
let leader_schedule_epoch = epoch_schedule.get_leader_schedule_epoch(slot); | |||
let leader_schedule_epoch = new.epoch_schedule().get_leader_schedule_epoch(slot); |
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.
👍
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.
lgtm, thanks!
this got stale because there was a merge conflict I didn't resolve for a bit. I think some of this may conflict with changes #32961 (or related PRs) has. So going to just hold this off until those get merged. |
@apfitzge I think you can rebase |
Some downstream issues w/ removing |
SPL fix PR: solana-labs/solana-program-library#5323 |
Hmm must have been another issue in SPL. I had run |
Finally fixed all the SPL stuff 😦 @Lichtso, @brooksprumo |
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.
Lgtm. Probably worthwhile to wait for approval from the other reviewers as well.
@Lichtso had to rebase this again, but should be in a good state again now. |
Problem
In #32547, I added a clippy allow lint for
CloneZeroed
types that wereCopy
to have an "incorrect" clone. For anyCopy
types, clippy considers aclone
that is anything other thanCopy
to be incorrect.EpochSchedule
andRent
turned out to be the onlyCopy
types using this derive macro.Summary of Changes
Copy
Copy
Copy
byClone
(this will ensure padding bytes are zero consistently)Fixes #32588