@@ -3257,7 +3257,10 @@ mod test {
32573257 } ;
32583258 use tokio:: time:: sleep;
32593259 use vbs:: version:: StaticVersion ;
3260- use versions:: { DRB_AND_HEADER_UPGRADE_VERSION , EPOCH_VERSION , FEE_VERSION , Upgrade , version} ;
3260+ use versions:: {
3261+ DRB_AND_HEADER_UPGRADE_VERSION , EPOCH_REWARD_VERSION , EPOCH_VERSION , FEE_VERSION , Upgrade ,
3262+ version,
3263+ } ;
32613264
32623265 use self :: {
32633266 data_source:: testing:: TestableSequencerDataSource , options:: HotshotEvents ,
@@ -4983,7 +4986,7 @@ mod test {
49834986 const EPOCH_HEIGHT : u64 = 10 ;
49844987 const NUM_NODES : usize = 5 ;
49854988
4986- const V6 : Upgrade = Upgrade :: trivial ( version ( 0 , 6 ) ) ;
4989+ const V5 : Upgrade = Upgrade :: trivial ( EPOCH_REWARD_VERSION ) ;
49874990
49884991 let network_config = TestConfigBuilder :: default ( )
49894992 . epoch_height ( EPOCH_HEIGHT )
@@ -5014,12 +5017,12 @@ mod test {
50145017 & NoMetrics ,
50155018 )
50165019 } ) )
5017- . pos_hook ( DelegationConfig :: MultipleDelegators , Default :: default ( ) , V6 )
5020+ . pos_hook ( DelegationConfig :: MultipleDelegators , Default :: default ( ) , V5 )
50185021 . await
50195022 . unwrap ( )
50205023 . build ( ) ;
50215024
5022- let _network = TestNetwork :: new ( config, V6 ) . await ;
5025+ let _network = TestNetwork :: new ( config, V5 ) . await ;
50235026 let client: Client < ServerError , SequencerApiVersion > =
50245027 Client :: new ( format ! ( "http://localhost:{api_port}" ) . parse ( ) . unwrap ( ) ) ;
50255028
@@ -5088,7 +5091,7 @@ mod test {
50885091 const EPOCH_HEIGHT : u64 = 10 ;
50895092 const NUM_NODES : usize = 5 ;
50905093
5091- const V6 : Upgrade = Upgrade :: trivial ( version ( 0 , 6 ) ) ;
5094+ const V5 : Upgrade = Upgrade :: trivial ( EPOCH_REWARD_VERSION ) ;
50925095
50935096 let network_config = TestConfigBuilder :: default ( )
50945097 . epoch_height ( EPOCH_HEIGHT )
@@ -5119,12 +5122,12 @@ mod test {
51195122 & NoMetrics ,
51205123 )
51215124 } ) )
5122- . pos_hook ( DelegationConfig :: MultipleDelegators , Default :: default ( ) , V6 )
5125+ . pos_hook ( DelegationConfig :: MultipleDelegators , Default :: default ( ) , V5 )
51235126 . await
51245127 . unwrap ( )
51255128 . build ( ) ;
51265129
5127- let _network = TestNetwork :: new ( config, V6 ) . await ;
5130+ let _network = TestNetwork :: new ( config, V5 ) . await ;
51285131 let client: Client < ServerError , SequencerApiVersion > =
51295132 Client :: new ( format ! ( "http://localhost:{api_port}" ) . parse ( ) . unwrap ( ) ) ;
51305133
@@ -5205,7 +5208,7 @@ mod test {
52055208 const EPOCH_HEIGHT : u64 = 10 ;
52065209 const NUM_NODES : usize = 5 ;
52075210 const NUM_EPOCHS : u64 = 6 ;
5208- const V6 : Upgrade = Upgrade :: trivial ( version ( 0 , 6 ) ) ;
5211+ const V5 : Upgrade = Upgrade :: trivial ( EPOCH_REWARD_VERSION ) ;
52095212
52105213 let network_config = TestConfigBuilder :: default ( )
52115214 . epoch_height ( EPOCH_HEIGHT )
@@ -5236,12 +5239,12 @@ mod test {
52365239 & NoMetrics ,
52375240 )
52385241 } ) )
5239- . pos_hook ( DelegationConfig :: MultipleDelegators , Default :: default ( ) , V6 )
5242+ . pos_hook ( DelegationConfig :: MultipleDelegators , Default :: default ( ) , V5 )
52405243 . await
52415244 . unwrap ( )
52425245 . build ( ) ;
52435246
5244- let network = TestNetwork :: new ( config, V6 ) . await ;
5247+ let network = TestNetwork :: new ( config, V5 ) . await ;
52455248 let client: Client < ServerError , SequencerApiVersion > =
52465249 Client :: new ( format ! ( "http://localhost:{api_port}" ) . parse ( ) . unwrap ( ) ) ;
52475250
@@ -5298,13 +5301,13 @@ mod test {
52985301 Ok ( ( ) )
52995302 }
53005303
5301- /// Verifies that the `leader_counts` array in V6 headers is correct.
5304+ /// Verifies that the `leader_counts` array in V5+ headers is correct.
53025305 #[ test_log:: test( tokio:: test( flavor = "multi_thread" ) ) ]
53035306 async fn test_epoch_leader_counts ( ) -> anyhow:: Result < ( ) > {
53045307 const EPOCH_HEIGHT : u64 = 10 ;
53055308 const NUM_NODES : usize = 5 ;
53065309 const NUM_EPOCHS : u64 = 6 ;
5307- const V6 : Upgrade = Upgrade :: trivial ( version ( 0 , 6 ) ) ;
5310+ const V5 : Upgrade = Upgrade :: trivial ( EPOCH_REWARD_VERSION ) ;
53085311
53095312 let network_config = TestConfigBuilder :: default ( )
53105313 . epoch_height ( EPOCH_HEIGHT )
@@ -5335,12 +5338,12 @@ mod test {
53355338 & NoMetrics ,
53365339 )
53375340 } ) )
5338- . pos_hook ( DelegationConfig :: MultipleDelegators , Default :: default ( ) , V6 )
5341+ . pos_hook ( DelegationConfig :: MultipleDelegators , Default :: default ( ) , V5 )
53395342 . await
53405343 . unwrap ( )
53415344 . build ( ) ;
53425345
5343- let network = TestNetwork :: new ( config, V6 ) . await ;
5346+ let network = TestNetwork :: new ( config, V5 ) . await ;
53445347 let client: Client < ServerError , SequencerApiVersion > =
53455348 Client :: new ( format ! ( "http://localhost:{api_port}" ) . parse ( ) . unwrap ( ) ) ;
53465349
@@ -5369,7 +5372,7 @@ mod test {
53695372
53705373 let header_leader_counts = header
53715374 . leader_counts ( )
5372- . expect ( "V6 header must have leader_counts" ) ;
5375+ . expect ( "V5+ header must have leader_counts" ) ;
53735376
53745377 // Reset counts at the start of a new epoch
53755378 let is_epoch_start = ( height - 1 ) % EPOCH_HEIGHT == 0 ;
0 commit comments