Skip to content
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

encapsulates shred's payload type #4690

Merged
merged 1 commit into from
Jan 29, 2025

Conversation

behzadnouri
Copy link

Problem

A wrapper type would allow to hide the implementation from the rest of the code-base and more easily roll-out changes.

Summary of Changes

The commit defines:

pub struct Payload(Vec<u8>);

as the new shred payload type.

@behzadnouri behzadnouri changed the title encapsulates shreds payload type encapsulates shred's payload type Jan 29, 2025
@behzadnouri behzadnouri force-pushed the shred-payload-encapsulate branch from f7c0ccd to 27a4050 Compare January 29, 2025 19:02
behzadnouri added a commit to behzadnouri/solana-program-slashing that referenced this pull request Jan 29, 2025
anza-xyz/agave#4690
encapsulates the type of shred payload, and this code should use

    shred.payload().as_ref()

instead of

    shred.payload().as_slice()
joncinque pushed a commit to solana-program/slashing that referenced this pull request Jan 29, 2025
anza-xyz/agave#4690
encapsulates the type of shred payload, and this code should use

    shred.payload().as_ref()

instead of

    shred.payload().as_slice()
@behzadnouri behzadnouri force-pushed the shred-payload-encapsulate branch from 27a4050 to 7955b0f Compare January 29, 2025 20:26
A wrapper type would allow to hide the implementation from the rest of
the code-base and more easily roll-out changes.
@behzadnouri behzadnouri force-pushed the shred-payload-encapsulate branch from 7955b0f to f8853eb Compare January 29, 2025 21:09
@behzadnouri behzadnouri merged commit 7d8cdd9 into anza-xyz:master Jan 29, 2025
45 of 47 checks passed
@behzadnouri behzadnouri deleted the shred-payload-encapsulate branch January 29, 2025 22:46
Copy link

@steviez steviez left a comment

Choose a reason for hiding this comment

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

I know this already merged, but gave it a review since I've been poking around in some similar areas; LGTM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants