@@ -263,7 +263,7 @@ mod tests {
263263 validator:: { PendingEvent , mock:: * } ,
264264 } ;
265265 use async_trait:: async_trait;
266- use ethexe_common:: { Address , Digest , HashOf , db:: * , gear:: CodeCommitment , mock:: * } ;
266+ use ethexe_common:: { Address , HashOf , db:: * , gear:: CodeCommitment , mock:: * } ;
267267 use nonempty:: nonempty;
268268
269269 #[ tokio:: test]
@@ -352,6 +352,13 @@ mod tests {
352352 // Waiting for announce to be computed
353353 assert ! ( state. is_producer( ) ) ;
354354
355+ // Set up computed announce in database before processing
356+ AnnounceData {
357+ announce : state. context ( ) . core . db . announce ( announce_hash) . unwrap ( ) ,
358+ computed : Some ( Default :: default ( ) ) ,
359+ }
360+ . setup ( & state. context ( ) . core . db ) ;
361+
355362 let ( state, event) = state
356363 . process_computed_announce ( ComputedAnnounce :: mock ( announce_hash) )
357364 . unwrap ( )
@@ -459,6 +466,13 @@ mod tests {
459466 . await
460467 . unwrap ( ) ;
461468
469+ // Set up computed announce in database before processing
470+ AnnounceData {
471+ announce : state. context ( ) . core . db . announce ( announce_hash) . unwrap ( ) ,
472+ computed : Some ( Default :: default ( ) ) ,
473+ }
474+ . setup ( & state. context ( ) . core . db ) ;
475+
462476 let ( state, event) = state
463477 . process_computed_announce ( ComputedAnnounce :: mock ( announce_hash) )
464478 . unwrap ( )
0 commit comments