-
Notifications
You must be signed in to change notification settings - Fork 8
feat: Handle account shrinking/expansion in merge_diff_copy #116
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -81,6 +81,8 @@ pub enum DlpError { | |
| UndelegateBufferAlreadyInitialized = 36, | ||
| #[error("Undelegate buffer PDA immutable")] | ||
| UndelegateBufferImmutable = 37, | ||
| #[error("An infallible error is encountered possibly due to logic error")] | ||
| InfallibleError = 100, | ||
|
Comment on lines
+84
to
+85
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. 🧹 Nitpick | 🔵 Trivial Consider renaming The name "InfallibleError" is contradictory—"infallible" typically means "incapable of failing." A clearer name might be 🔎 Suggested rename- #[error("An infallible error is encountered possibly due to logic error")]
- InfallibleError = 100,
+ #[error("Internal invariant violation: reached logically impossible state")]
+ InvariantViolation = 100,
🤖 Prompt for AI Agents |
||
| } | ||
|
|
||
| impl From<DlpError> for ProgramError { | ||
|
|
||
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.
Typo in comment.
Line 333 contains "destinatiare" which should be "destination".
🔎 Proposed fix
Ordering::Greater => { - // It is an impossible scenario. Even if the diff is corrupt, or the lengths of destinatiare are same + // It is an impossible scenario. Even if the diff is corrupt, or the lengths of destination are same // or different, we'll not encounter this case. It only implies logic error. return Err(DlpError::InfallibleError.into()); }📝 Committable suggestion
🤖 Prompt for AI Agents