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

Emitter: updated drop tracking #147

Merged
merged 2 commits into from
Nov 17, 2023
Merged

Emitter: updated drop tracking #147

merged 2 commits into from
Nov 17, 2023

Conversation

markuspluna
Copy link
Contributor

Changed how we track what drops have occurred to use a list of addresses instead of a bool status.

Resolves: #145

@markuspluna markuspluna changed the title Emitter: updated deop tracking Emitter: updated drop tracking Nov 16, 2023
Copy link
Contributor

@mootz12 mootz12 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Small change to storage getter. Looks good otherwise!

.get(&EmitterDataKey::DropStatus)
.unwrap_optimized()
.get::<EmitterDataKey, bool>(&EmitterDataKey::Dropped(backstop.clone()))
.is_some()
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This feels like it could introduce a bug if changes are made down the line, as someone could store "false" here with the assumption the address can be dropped too.

Can we change is_some() to unwrap_optimized()?

@mootz12 mootz12 merged commit 4ebec99 into main Nov 17, 2023
3 checks passed
@mootz12 mootz12 deleted the issue-145-drop-tracking branch November 17, 2023 16:28
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

Successfully merging this pull request may close these issues.

Emitter: Drop status tracking
2 participants