File tree Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Expand file tree Collapse file tree 1 file changed +10
-2
lines changed Original file line number Diff line number Diff line change @@ -1003,6 +1003,14 @@ pub struct GetAddressInfoResult {
1003
1003
pub label : Option < String > ,
1004
1004
}
1005
1005
1006
+ /// Used to represent values that can either be a string or a string array.
1007
+ #[ derive( Clone , Debug , Deserialize , Serialize ) ]
1008
+ #[ serde( untagged) ]
1009
+ pub enum StringOrStringArray {
1010
+ String ( String ) ,
1011
+ StringArray ( Vec < String > ) ,
1012
+ }
1013
+
1006
1014
/// Models the result of "getblockchaininfo"
1007
1015
#[ derive( Clone , Debug , Deserialize , Serialize ) ]
1008
1016
pub struct GetBlockchainInfoResult {
@@ -1044,8 +1052,8 @@ pub struct GetBlockchainInfoResult {
1044
1052
/// Status of softforks in progress
1045
1053
#[ serde( default ) ]
1046
1054
pub softforks : HashMap < String , Softfork > ,
1047
- /// Any network and blockchain warnings.
1048
- pub warnings : String ,
1055
+ /// Any network and blockchain warnings. In later versions of bitcoind, it's an array of strings.
1056
+ pub warnings : StringOrStringArray ,
1049
1057
}
1050
1058
1051
1059
#[ derive( Clone , PartialEq , Eq , Debug ) ]
You can’t perform that action at this time.
0 commit comments