Skip to content
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

was_destroyed was a highly misleading function name. #1830

Open
dyxushuai opened this issue Oct 23, 2024 · 2 comments
Open

was_destroyed was a highly misleading function name. #1830

dyxushuai opened this issue Oct 23, 2024 · 2 comments

Comments

@dyxushuai
Copy link
Contributor

Related: taikoxyz/raiko#395

pub fn was_destroyed(&self) -> bool {
matches!(
self,
AccountStatus::Destroyed
| AccountStatus::DestroyedChanged
| AccountStatus::DestroyedAgain
)
}

DestroyedChanged doesn't mean the Account has been deleted. Is it designed like this?

@rakita
Copy link
Member

rakita commented Oct 23, 2024

Hm I see that it can be misleading, maybe better naming is ChangedAfterDestruction or DestroyedThanChanged, wdyt?

@dyxushuai
Copy link
Contributor Author

Hm I see that it can be misleading, maybe better naming is ChangedAfterDestruction or DestroyedThanChanged, wdyt?

Breaking down the DestroyedChanged status into more detailed segments is always preferable!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants
@dyxushuai @rakita and others