From 1ed6147253bba640d14bcc3acf50d2e8a0fc794c Mon Sep 17 00:00:00 2001 From: Romain Ruetschi Date: Mon, 1 Feb 2021 19:12:12 +0100 Subject: [PATCH] Avoid duplicate tag name for ConnectionEnd, ChannelEnd, AnyConsensusState and AnyClientState --- modules/src/ics02_client/client_def.rs | 4 ++-- modules/src/ics03_connection/connection.rs | 2 +- modules/src/ics04_channel/channel.rs | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/modules/src/ics02_client/client_def.rs b/modules/src/ics02_client/client_def.rs index 1d02ad1e0e..d2a64f944c 100644 --- a/modules/src/ics02_client/client_def.rs +++ b/modules/src/ics02_client/client_def.rs @@ -177,7 +177,7 @@ impl From for Any { } #[derive(Clone, Debug, PartialEq, Eq, Serialize)] -#[serde(tag = "AnyClientState")] +#[serde(tag = "type")] pub enum AnyClientState { Tendermint(TendermintClientState), @@ -273,7 +273,7 @@ impl ClientState for AnyClientState { } #[derive(Clone, Debug, PartialEq, Eq, Serialize)] -#[serde(tag = "AnyConsensusState")] +#[serde(tag = "type")] pub enum AnyConsensusState { Tendermint(TendermintConsensusState), diff --git a/modules/src/ics03_connection/connection.rs b/modules/src/ics03_connection/connection.rs index ed3c69a554..18bea17de4 100644 --- a/modules/src/ics03_connection/connection.rs +++ b/modules/src/ics03_connection/connection.rs @@ -15,7 +15,7 @@ use crate::ics24_host::error::ValidationError; use crate::ics24_host::identifier::{ClientId, ConnectionId}; #[derive(Clone, Debug, PartialEq, Serialize)] -#[serde(tag = "ConnectionEnd")] +#[serde(tag = "type")] pub struct ConnectionEnd { state: State, client_id: ClientId, diff --git a/modules/src/ics04_channel/channel.rs b/modules/src/ics04_channel/channel.rs index e4f8b86c57..95e8101223 100644 --- a/modules/src/ics04_channel/channel.rs +++ b/modules/src/ics04_channel/channel.rs @@ -16,7 +16,7 @@ use crate::ics04_channel::{ use crate::ics24_host::identifier::{ChannelId, ConnectionId, PortId}; #[derive(Clone, Debug, PartialEq, Serialize)] -#[serde(tag = "ChannelEnd")] // Internal tagging, to make the type explicit in JSON outputs. +#[serde(tag = "type")] // Internal tagging, to make the type explicit in JSON outputs. pub struct ChannelEnd { // see https://serde.rs/enum-representations.html#internally-tagged state: State,