sdk/rust: Remove `expiration_time` from `GuardianSetInfo`
This field doesn't actually appear in `GuardianSetUpgrade` governance messages and was already being skipped by serde so just remove it completely. Contracts that need to keep track of this information can encapsulate the `GuardianSetInfo` inside another struct that has an `expiration_time` field.
This commit is contained in:
parent
3a1dd9eccd
commit
e05176c9be
|
@ -541,7 +541,6 @@ mod test {
|
|||
0xeb, 0x15, 0xe8, 0x0c, 0x9a, 0x99, 0xc8, 0x34, 0x8d,
|
||||
]),
|
||||
],
|
||||
expiration_time: 0,
|
||||
},
|
||||
},
|
||||
},
|
||||
|
|
|
@ -65,10 +65,6 @@ pub struct Amount(pub [u8; 32]);
|
|||
pub struct GuardianSetInfo {
|
||||
/// The set of guardians public keys, in Ethereum's compressed format.
|
||||
pub addresses: Vec<GuardianAddress>,
|
||||
|
||||
/// How long after a GuardianSet change before this set is expired.
|
||||
#[serde(skip)]
|
||||
pub expiration_time: u64,
|
||||
}
|
||||
|
||||
impl GuardianSetInfo {
|
||||
|
@ -112,7 +108,6 @@ mod test {
|
|||
for (count, quorum) in tests {
|
||||
let gs = GuardianSetInfo {
|
||||
addresses: vec![Default::default(); count],
|
||||
expiration_time: 0,
|
||||
};
|
||||
|
||||
assert_eq!(quorum, gs.quorum());
|
||||
|
|
|
@ -308,7 +308,6 @@ mod tests {
|
|||
struct GuardianSetInfo<'a> {
|
||||
#[serde(borrow)]
|
||||
addresses: Cow<'a, [GuardianAddress<'a>]>,
|
||||
expiration_time: u64,
|
||||
}
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize, PartialEq, Eq)]
|
||||
|
|
Loading…
Reference in New Issue