Skip to content

Commit 5ce1bed

Browse files
authored
Merge pull request #6 from chainwayxyz/fix-warnings
Use StringOrStringArray for all warnings fields
2 parents ede8097 + 9802f41 commit 5ce1bed

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

json/src/lib.rs

+4-2
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,8 @@ pub struct GetNetworkInfoResult {
119119
pub incremental_fee: Amount,
120120
#[serde(rename = "localaddresses")]
121121
pub local_addresses: Vec<GetNetworkInfoResultAddress>,
122-
pub warnings: String,
122+
/// Any network and blockchain warnings. In later versions of bitcoind, it's an array of strings.
123+
pub warnings: StringOrStringArray,
123124
}
124125

125126
#[derive(Clone, PartialEq, Eq, Debug, Deserialize, Serialize)]
@@ -586,7 +587,8 @@ pub struct GetMiningInfoResult {
586587
pub pooled_tx: usize,
587588
#[serde(deserialize_with = "deserialize_bip70_network")]
588589
pub chain: Network,
589-
pub warnings: String,
590+
/// Any network and blockchain warnings. In later versions of bitcoind, it's an array of strings.
591+
pub warnings: StringOrStringArray,
590592
}
591593

592594
#[derive(Clone, PartialEq, Eq, Debug, Deserialize, Serialize)]

0 commit comments

Comments
 (0)