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

TransactionView: InstructionsMeta #2476

Merged
merged 4 commits into from
Aug 8, 2024

Conversation

apfitzge
Copy link

@apfitzge apfitzge commented Aug 7, 2024

Problem

Summary of Changes

  • Parse instructions

Fixes #

@apfitzge apfitzge self-assigned this Aug 7, 2024
@apfitzge apfitzge mentioned this pull request Aug 7, 2024
14 tasks
@apfitzge apfitzge marked this pull request as ready for review August 7, 2024 22:17
result::Result,
};

/// Contains meta-data about the instructions in a transaction packet.
Copy link

Choose a reason for hiding this comment

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

Suggested change
/// Contains meta-data about the instructions in a transaction packet.
/// Contains metadata about the instructions in a transaction packet.

Copy link
Author

Choose a reason for hiding this comment

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

fn test_zero_instructions() {
let bytes = bincode::serialize(&ShortVec(Vec::<CompiledInstruction>::new())).unwrap();
let mut offset = 0;
assert!(InstructionsMeta::try_new(&bytes, &mut offset).is_ok());
Copy link

Choose a reason for hiding this comment

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

Should we check in this case that the number of instructions is zero?

Copy link
Author

Choose a reason for hiding this comment

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

Yeah idk how I missed that when writing.
I added some additional asserts on the offset as well: ed84c80

@apfitzge apfitzge merged commit 776544c into anza-xyz:master Aug 8, 2024
40 checks passed
@apfitzge apfitzge deleted the instructions_meta branch August 8, 2024 19:20
ray-kast pushed a commit to abklabs/agave that referenced this pull request Nov 27, 2024
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.

2 participants