22mod tests {
33 use std:: time:: Duration ;
44
5- use roughenough_protocol:: tags:: Version ;
5+ use roughenough_protocol:: tags:: ProtocolVersion ;
66 use roughenough_protocol:: util:: ClockSource ;
77
88 use crate :: longterm:: LongTermIdentity ;
@@ -31,7 +31,7 @@ mod tests {
3131 let validity_duration = Duration :: from_secs ( 3600 ) ; // 1 hour
3232
3333 let backend = Box :: new ( MemoryBackend :: from_random ( ) ) ;
34- let mut identity = LongTermIdentity :: new ( Version :: RfcDraft14 , backend) ;
34+ let mut identity = LongTermIdentity :: new ( ProtocolVersion :: RfcDraft14 , backend) ;
3535
3636 // When: An online key is created
3737 let online_key = identity. make_online_key ( & clock, validity_duration) ;
@@ -48,7 +48,7 @@ mod tests {
4848 let validity_duration = Duration :: from_secs ( 3600 ) ;
4949
5050 let backend = Box :: new ( MemoryBackend :: from_random ( ) ) ;
51- let mut identity = LongTermIdentity :: new ( Version :: RfcDraft14 , backend) ;
51+ let mut identity = LongTermIdentity :: new ( ProtocolVersion :: RfcDraft14 , backend) ;
5252 let online_key = identity. make_online_key ( & clock, validity_duration) ;
5353
5454 // Initially, key should not be expired
@@ -78,7 +78,7 @@ mod tests {
7878 let rotation_interval = 50u64 ; // Rotate every 50 seconds
7979
8080 let backend = Box :: new ( MemoryBackend :: from_random ( ) ) ;
81- let mut identity = LongTermIdentity :: new ( Version :: RfcDraft14 , backend) ;
81+ let mut identity = LongTermIdentity :: new ( ProtocolVersion :: RfcDraft14 , backend) ;
8282
8383 let mut keys = Vec :: new ( ) ;
8484 let mut current_time = start_time;
@@ -123,7 +123,7 @@ mod tests {
123123 let validity_duration = Duration :: from_secs ( 3600 ) ;
124124
125125 let backend = Box :: new ( MemoryBackend :: from_random ( ) ) ;
126- let mut identity = LongTermIdentity :: new ( Version :: RfcDraft14 , backend) ;
126+ let mut identity = LongTermIdentity :: new ( ProtocolVersion :: RfcDraft14 , backend) ;
127127 let mut online_key = identity. make_online_key ( & clock, validity_duration) ;
128128
129129 // Advance to 1 second before expiration
@@ -148,7 +148,7 @@ mod tests {
148148 let rotation_interval = 1800u64 ; // 30 minute rotation
149149
150150 let backend = Box :: new ( MemoryBackend :: from_random ( ) ) ;
151- let mut identity = LongTermIdentity :: new ( Version :: RfcDraft14 , backend) ;
151+ let mut identity = LongTermIdentity :: new ( ProtocolVersion :: RfcDraft14 , backend) ;
152152
153153 // Create first key
154154 let first_key = identity. make_online_key ( & clock, validity_duration) ;
@@ -186,15 +186,15 @@ mod tests {
186186 let validity_duration = Duration :: from_secs ( 3600 ) ;
187187
188188 let backend = Box :: new ( MemoryBackend :: from_random ( ) ) ;
189- let mut identity = LongTermIdentity :: new ( Version :: RfcDraft14 , backend) ;
189+ let mut identity = LongTermIdentity :: new ( ProtocolVersion :: RfcDraft14 , backend) ;
190190 let mut online_key = identity. make_online_key ( & clock, validity_duration) ;
191191
192192 // Create SREP and verify it has correct properties
193193 let merkle_root = roughenough_protocol:: tags:: MerkleRoot :: from ( [ 0x77 ; 32 ] ) ;
194194 let ( srep, _) = online_key. make_srep ( & merkle_root) ;
195195
196196 assert_eq ! ( srep. midp( ) , start_time) ;
197- assert_eq ! ( * srep. ver( ) , Version :: RfcDraft14 ) ;
197+ assert_eq ! ( * srep. ver( ) , ProtocolVersion :: RfcDraft14 ) ;
198198 assert_eq ! ( srep. root( ) , & merkle_root) ;
199199 }
200200}
0 commit comments