-
Notifications
You must be signed in to change notification settings - Fork 222
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
[solana] Add wrong vaa tests #1262
Conversation
The latest updates on your projects. Learn more about Vercel for Git ↗︎ 2 Ignored Deployments
|
@@ -2,16 +2,9 @@ use anchor_lang::prelude::*; | |||
|
|||
#[error_code] | |||
pub enum ReceiverError { |
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.
Reordered the errors to match the order of the tests
@@ -143,7 +143,7 @@ pub mod pyth_solana_receiver { | |||
// We do not allow for non-increasing guardian signature indices. | |||
let index = usize::from(sig.guardian_index()); | |||
if let Some(last_index) = last_guardian_index { | |||
require!(index > last_index, ReceiverError::InvalidGuardianIndex); | |||
require!(index > last_index, ReceiverError::InvalidGuardianOrder); |
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.
Changing this error because the same error code was used in another location
I'm trying to exhaustively test all errors that the receiver can throw. This covers 12 errors of the 21.