-
Notifications
You must be signed in to change notification settings - Fork 329
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: Message Header Meta #2409
Conversation
08c9832
to
925a947
Compare
match version { | ||
// add one byte for prefix byte. Do not need to check for | ||
// overflow here, because we have already checked. | ||
0 => (TransactionVersion::V0, message_offset.wrapping_add(1)), |
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.
You could have just done *offset += 1
here, instead of creating a new variable.
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 I don't think we need to have new variable here. We've already advanced the byte, we actually need to "go back" in the case of legacy instead of v1 since we read the byte here:
let message_prefix = read_byte(bytes, offset)?;
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.
let me know what you think of this: 2b30a84
Instead of adjusting the offset I just adjusted how we read the number of required signatures.
Legacy txs it will just be the byte we tried reading for the message prefix.
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.
that should actually save us from re-reading the byte; though i'm not sure that would significantly affect peformance.
Gonna hold off on merging until after #2408 so I can rebase and pick up the Killing CI since I don't really need it before that rebase. Edit: wait I am an idiot. This doesn't use those functions 🤦♂️ restarting CI |
Problem
Summary of Changes
Fixes #