-
Notifications
You must be signed in to change notification settings - Fork 337
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
Conversation
result::Result, | ||
}; | ||
|
||
/// Contains meta-data about the instructions in a transaction packet. |
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.
/// Contains meta-data about the instructions in a transaction packet. | |
/// Contains metadata about the instructions in a transaction packet. |
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.
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()); |
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.
Should we check in this case that the number of instructions is zero?
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.
Yeah idk how I missed that when writing.
I added some additional asserts on the offset as well: ed84c80
Problem
Summary of Changes
Fixes #