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

add serializers for TmShaHasher #22

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

S1nus
Copy link
Contributor

@S1nus S1nus commented May 14, 2024

No description provided.

@@ -22,6 +22,8 @@ fn inner_hash(left: &[u8], right: &[u8]) -> [u8; 32] {
}

/// A sha256 hasher, compatible with [Tendermint merkle hash](https://github.com/informalsystems/tendermint-rs/blob/979456c9f33463944f97f7ea3900640e59f7ea6d/tendermint/src/merkle.rs)
#[derive(Debug, Clone, Copy)]
#[cfg_attr(feature = "serde", derive(serde::Serialize, serde::Deserialize))]
Copy link
Member

Choose a reason for hiding this comment

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

This looks fine assuming the motivation is just a more convenient around serde's bound inference problems, but note that since the hasher is a ZST it won't actually appear in the serialized output

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.

2 participants