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

chore: impl Hash for Txenvelope #2170

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open

Conversation

mattsse
Copy link
Member

@mattsse mattsse commented Mar 8, 2025

use tx hash as hash, same as

impl Hash for PooledTransaction {
fn hash<H: Hasher>(&self, state: &mut H) {
self.trie_hash().hash(state);
}
}

Copy link
Member

@DaniPopes DaniPopes left a comment

Choose a reason for hiding this comment

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

if the hash can be invalidated through mutation then this is incorrect

if not then equality should also be implemented like this

@mattsse
Copy link
Member Author

mattsse commented Mar 8, 2025

max pain

@mattsse
Copy link
Member Author

mattsse commented Mar 8, 2025

@DaniPopes impled hash for signed, mirroring partialeq and derived it for txenvelope instead

@mattsse mattsse enabled auto-merge (squash) March 8, 2025 09:27
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
Status: No status
Development

Successfully merging this pull request may close these issues.

2 participants