diff --git a/CHANGELOG.md b/CHANGELOG.md index 724ef6f..9531ee9 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -18,8 +18,14 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 - `ProtocolError::verify_messages_constitute_error()` now takes messages and mapping of messages by value. ([#76]) +### Added + +- `impl From for ProtocolValidationError` (to match what already exists for other messages). ([#77]) + + [#75]: https://github.com/entropyxyz/manul/pull/75 [#76]: https://github.com/entropyxyz/manul/pull/76 +[#77]: https://github.com/entropyxyz/manul/pull/77 ## [0.1.0] - 2024-11-19 diff --git a/manul/src/protocol/errors.rs b/manul/src/protocol/errors.rs index 42d9cab..6a34d89 100644 --- a/manul/src/protocol/errors.rs +++ b/manul/src/protocol/errors.rs @@ -204,6 +204,12 @@ impl From for ProtocolValidationError { } } +impl From for ProtocolValidationError { + fn from(error: NormalBroadcastError) -> Self { + Self::InvalidEvidence(format!("Failed to deserialize normal broadcast: {error:?}")) + } +} + impl From for ProtocolValidationError { fn from(error: LocalError) -> Self { Self::Local(error)