@@ -84,6 +84,9 @@ impl SignedEntityConfig {
84
84
. compute_block_number_to_be_signed ( time_point. chain_point . block_number ) ,
85
85
)
86
86
}
87
+ SignedEntityTypeDiscriminants :: CardanoDatabase => SignedEntityType :: CardanoDatabase (
88
+ CardanoDbBeacon :: new ( * time_point. epoch , time_point. immutable_file_number ) ,
89
+ ) ,
87
90
} ;
88
91
89
92
Ok ( signed_entity_type)
@@ -239,6 +242,16 @@ mod tests {
239
242
)
240
243
. unwrap( )
241
244
) ;
245
+
246
+ assert_eq ! (
247
+ SignedEntityType :: CardanoDatabase ( CardanoDbBeacon :: new( 1 , 5 ) ) ,
248
+ config
249
+ . time_point_to_signed_entity(
250
+ SignedEntityTypeDiscriminants :: CardanoDatabase ,
251
+ & time_point
252
+ )
253
+ . unwrap( )
254
+ ) ;
242
255
}
243
256
244
257
#[ test]
@@ -372,6 +385,7 @@ mod tests {
372
385
allowed_discriminants : BTreeSet :: from ( [
373
386
SignedEntityTypeDiscriminants :: CardanoStakeDistribution ,
374
387
SignedEntityTypeDiscriminants :: CardanoTransactions ,
388
+ SignedEntityTypeDiscriminants :: CardanoDatabase ,
375
389
] ) ,
376
390
..SignedEntityConfig :: dummy ( )
377
391
} ;
@@ -381,11 +395,13 @@ mod tests {
381
395
assert_eq ! (
382
396
BTreeSet :: from_iter(
383
397
[
384
- SignedEntityConfig :: DEFAULT_ALLOWED_DISCRIMINANTS ,
398
+ SignedEntityConfig :: DEFAULT_ALLOWED_DISCRIMINANTS . as_slice ( ) ,
385
399
[
386
400
SignedEntityTypeDiscriminants :: CardanoStakeDistribution ,
387
401
SignedEntityTypeDiscriminants :: CardanoTransactions ,
402
+ SignedEntityTypeDiscriminants :: CardanoDatabase
388
403
]
404
+ . as_slice( )
389
405
]
390
406
. concat( )
391
407
) ,
0 commit comments