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 {
10031003 pub label : Option < String > ,
10041004}
10051005
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+
10061014/// Models the result of "getblockchaininfo"
10071015#[ derive( Clone , Debug , Deserialize , Serialize ) ]
10081016pub struct GetBlockchainInfoResult {
@@ -1044,8 +1052,8 @@ pub struct GetBlockchainInfoResult {
10441052 /// Status of softforks in progress
10451053 #[ serde( default ) ]
10461054 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 ,
10491057}
10501058
10511059#[ derive( Clone , PartialEq , Eq , Debug ) ]
You can’t perform that action at this time.
0 commit comments