From 7584f491f8411094dacab1776b13aa1e023dfa56 Mon Sep 17 00:00:00 2001 From: Matthew Little Date: Thu, 24 Oct 2024 14:56:24 +0200 Subject: [PATCH] fix: BlockRejectReasonCode serialization tweak --- components/chainhook-types-rs/src/signers.rs | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/components/chainhook-types-rs/src/signers.rs b/components/chainhook-types-rs/src/signers.rs index 36662a3a..c0754dd2 100644 --- a/components/chainhook-types-rs/src/signers.rs +++ b/components/chainhook-types-rs/src/signers.rs @@ -55,11 +55,13 @@ pub enum BlockValidationFailedCode { } #[derive(Debug, Clone, PartialEq, Deserialize, Serialize)] -#[serde(untagged)] #[serde(rename_all = "SCREAMING_SNAKE_CASE")] pub enum BlockRejectReasonCode { #[serde(rename_all = "SCREAMING_SNAKE_CASE")] - ValidationFailed { validation_failed: BlockValidationFailedCode }, + ValidationFailed { + #[serde(rename = "VALIDATION_FAILED")] + validation_failed: BlockValidationFailedCode, + }, ConnectivityIssues, RejectedInPriorRound, NoSortitionView,