-
Notifications
You must be signed in to change notification settings - Fork 1.3k
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
lang: add check that declared id == program id #1451
lang: add check that declared id == program id #1451
Conversation
wasnt quite sure which category to put the error under. used |
lang/src/error.rs
Outdated
// Miscellaneous | ||
/// 50 - The declared program id does not match actual program id | ||
#[msg("The declared program id does not match the actual program id")] | ||
DeclaredProgramIdMismatch = 50, |
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.
Will this collide with solana_program error codes? Probably not?
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.
probably not but no reason to take that risk. we can move the misc errors to 4500
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.
moved to 4100
tests/declare-id/package-lock.json
Outdated
@@ -0,0 +1,16 @@ | |||
{ |
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.
file to be removed
tests/declare-id/yarn.lock
Outdated
@@ -0,0 +1,4 @@ | |||
# THIS IS AN AUTOGENERATED FILE. DO NOT EDIT THIS FILE DIRECTLY. |
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.
file to be removed
implemented review |
No description provided.