From e03cd640bfe4f004bb415b9122aab0617dd942a3 Mon Sep 17 00:00:00 2001 From: Roman Zeyde Date: Sat, 11 May 2024 10:56:47 +0300 Subject: [PATCH] Support multiple warnings in RPC responses Following https://github.com/rust-bitcoin/rust-bitcoincore-rpc/pull/353. --- json/src/lib.rs | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/json/src/lib.rs b/json/src/lib.rs index e5c2e771..25f3508e 100644 --- a/json/src/lib.rs +++ b/json/src/lib.rs @@ -118,7 +118,7 @@ pub struct GetNetworkInfoResult { pub incremental_fee: Amount, #[serde(rename = "localaddresses")] pub local_addresses: Vec, - pub warnings: String, + pub warnings: StringOrStringArray, } #[derive(Clone, PartialEq, Eq, Debug, Deserialize, Serialize)] @@ -517,7 +517,7 @@ pub struct GetMiningInfoResult { pub pooled_tx: usize, #[serde(deserialize_with = "deserialize_bip70_network")] pub chain: Network, - pub warnings: String, + pub warnings: StringOrStringArray, } #[derive(Clone, PartialEq, Eq, Debug, Deserialize, Serialize)] @@ -1005,7 +1005,7 @@ pub struct GetAddressInfoResult { } /// Used to represent values that can either be a string or a string array. -#[derive(Clone, Debug, Deserialize, Serialize)] +#[derive(Clone, Debug, Deserialize, PartialEq, Eq, Serialize)] #[serde(untagged)] pub enum StringOrStringArray { String(String),