1- #[ cfg( feature = "serde" ) ]
21use :: serde:: { Deserialize , Serialize } ;
32use jormungandr_lib:: { crypto:: account:: Identifier , interfaces:: Value } ;
43
@@ -13,11 +12,10 @@ pub type VotingGroup = String;
1312///
1413/// You can roughly read this as
1514/// "voting_key will participate in this voting round with role voting_group and will have voting_power influence"
16- #[ derive( Debug , Clone , PartialEq , Hash , Eq ) ]
17- #[ cfg_attr( feature = "serde" , derive( Serialize , Deserialize ) ) ]
15+ #[ derive( Serialize , Deserialize , Debug , Clone , PartialEq , Hash , Eq ) ]
1816pub struct VoterHIR {
1917 // Keep hex encoding as in CIP-36
20- #[ cfg_attr ( feature = " serde" , serde ( with = "serde" ) ) ]
18+ #[ serde( with = "serde" ) ]
2119 pub voting_key : Identifier ,
2220 /// Voting group this key belongs to.
2321 /// If this key belong to multiple voting groups, multiple records for the same
@@ -27,7 +25,6 @@ pub struct VoterHIR {
2725 pub voting_power : Value ,
2826}
2927
30- #[ cfg( feature = "serde" ) ]
3128mod serde {
3229 use super :: * ;
3330 use :: serde:: { de:: Error , Deserializer , Serializer } ;
0 commit comments