Skip to content

Commit 0cdbc25

Browse files
committed
Merge #356: Support multiple warnings in RPC responses
e03cd64 Support multiple warnings in RPC responses (Roman Zeyde) Pull request description: Following #353. Tested on latest bitcoind (bitcoin/bitcoin@2cedb42) with latest electrs (romanz/electrs@7773c26). ACKs for top commit: apoelstra: ACK e03cd64 neat! that was easy Tree-SHA512: df9c038f8e1ccac54a07ad13c7ed87f3a92909c20128fcb598b9891d59127a289bbaf79f9a505d9c87347ffd79dc2aaa063ad750126dbd95a916541d032f4106
2 parents 95d035b + e03cd64 commit 0cdbc25

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

json/src/lib.rs

+3-3
Original file line numberDiff line numberDiff line change
@@ -118,7 +118,7 @@ pub struct GetNetworkInfoResult {
118118
pub incremental_fee: Amount,
119119
#[serde(rename = "localaddresses")]
120120
pub local_addresses: Vec<GetNetworkInfoResultAddress>,
121-
pub warnings: String,
121+
pub warnings: StringOrStringArray,
122122
}
123123

124124
#[derive(Clone, PartialEq, Eq, Debug, Deserialize, Serialize)]
@@ -517,7 +517,7 @@ pub struct GetMiningInfoResult {
517517
pub pooled_tx: usize,
518518
#[serde(deserialize_with = "deserialize_bip70_network")]
519519
pub chain: Network,
520-
pub warnings: String,
520+
pub warnings: StringOrStringArray,
521521
}
522522

523523
#[derive(Clone, PartialEq, Eq, Debug, Deserialize, Serialize)]
@@ -1005,7 +1005,7 @@ pub struct GetAddressInfoResult {
10051005
}
10061006

10071007
/// Used to represent values that can either be a string or a string array.
1008-
#[derive(Clone, Debug, Deserialize, Serialize)]
1008+
#[derive(Clone, Debug, Deserialize, PartialEq, Eq, Serialize)]
10091009
#[serde(untagged)]
10101010
pub enum StringOrStringArray {
10111011
String(String),

0 commit comments

Comments
 (0)