@@ -127,10 +127,11 @@ impl SignedEntityType {
127127 /// Return the associated open message timeout
128128 pub fn get_open_message_timeout ( & self ) -> Option < Duration > {
129129 match self {
130- Self :: MithrilStakeDistribution ( _) | Self :: CardanoImmutableFilesFull ( _) => None ,
131- Self :: CardanoStakeDistribution ( _) => Some ( Duration :: from_secs ( 600 ) ) ,
132- Self :: CardanoTransactions ( _, _) => Some ( Duration :: from_secs ( 1800 ) ) ,
133- Self :: CardanoDatabase ( _) => Some ( Duration :: from_secs ( 1800 ) ) ,
130+ Self :: MithrilStakeDistribution ( _) => Some ( Duration :: from_secs ( 3600 ) ) ,
131+ Self :: CardanoImmutableFilesFull ( _) => Some ( Duration :: from_secs ( 600 ) ) ,
132+ Self :: CardanoStakeDistribution ( _) => Some ( Duration :: from_secs ( 1800 ) ) ,
133+ Self :: CardanoTransactions ( _, _) => Some ( Duration :: from_secs ( 600 ) ) ,
134+ Self :: CardanoDatabase ( _) => Some ( Duration :: from_secs ( 600 ) ) ,
134135 }
135136 }
136137
@@ -377,6 +378,33 @@ mod tests {
377378 ) ;
378379 }
379380
381+ #[ test]
382+ fn get_open_message_timeout ( ) {
383+ assert_eq ! (
384+ SignedEntityType :: MithrilStakeDistribution ( Epoch ( 1 ) ) . get_open_message_timeout( ) ,
385+ Some ( Duration :: from_secs( 3600 ) )
386+ ) ;
387+ assert_eq ! (
388+ SignedEntityType :: CardanoImmutableFilesFull ( CardanoDbBeacon :: new( 1 , 1 ) )
389+ . get_open_message_timeout( ) ,
390+ Some ( Duration :: from_secs( 600 ) )
391+ ) ;
392+ assert_eq ! (
393+ SignedEntityType :: CardanoStakeDistribution ( Epoch ( 1 ) ) . get_open_message_timeout( ) ,
394+ Some ( Duration :: from_secs( 1800 ) )
395+ ) ;
396+ assert_eq ! (
397+ SignedEntityType :: CardanoTransactions ( Epoch ( 1 ) , BlockNumber ( 1 ) )
398+ . get_open_message_timeout( ) ,
399+ Some ( Duration :: from_secs( 600 ) )
400+ ) ;
401+ assert_eq ! (
402+ SignedEntityType :: CardanoDatabase ( CardanoDbBeacon :: new( 1 , 1 ) )
403+ . get_open_message_timeout( ) ,
404+ Some ( Duration :: from_secs( 600 ) )
405+ ) ;
406+ }
407+
380408 #[ test]
381409 fn serialize_beacon_to_json ( ) {
382410 let cardano_stake_distribution_json = SignedEntityType :: CardanoStakeDistribution ( Epoch ( 25 ) )
0 commit comments