Skip to content

Conversation

mattsse
Copy link
Contributor

@mattsse mattsse commented Oct 10, 2025

Changed is_allowed_to_fail and is_optional to accept &TxHash instead of TxHash. These methods are primarily used for lookups in collections, and accepting a reference allows implementations to use methods like Vec::contains() and HashSet::contains() directly without requiring callers to copy the hash.

this gets rid of copies when the bundle is executed:

https://github.com/mattsse/rblib/blob/f8f44b448ac061456d9df23b449bf9ed9d967ce6/src/payload/exec.rs#L207-L210

Changed `is_allowed_to_fail` and `is_optional` to accept `&TxHash`
instead of `TxHash`. These methods are primarily used for lookups in
collections, and accepting a reference allows implementations to use
methods like `Vec::contains()` and `HashSet::contains()` directly
without requiring callers to copy the hash.
Copy link
Collaborator

@julio4 julio4 left a comment

Choose a reason for hiding this comment

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

Thanks!

@julio4 julio4 merged commit 624ead4 into flashbots:main Oct 10, 2025
4 checks passed
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.

3 participants