@@ -214,62 +214,61 @@ impl Initialized {
214214 gum:: trace!( target: LOG_TARGET , "Waiting for message" ) ;
215215 let mut overlay_db = OverlayedBackend :: new ( backend) ;
216216 let default_confirm = Box :: new ( || Ok ( ( ) ) ) ;
217- let confirm_write = match MuxedMessage :: receive ( ctx, & mut self . participation_receiver )
218- . await ?
219- {
220- MuxedMessage :: Participation ( msg) => {
221- gum:: trace!( target: LOG_TARGET , "MuxedMessage::Participation" ) ;
222- let ParticipationStatement {
223- session,
224- candidate_hash,
225- candidate_receipt,
226- outcome,
227- } = self . participation . get_participation_result ( ctx, msg) . await ?;
228- if let Some ( valid) = outcome. validity ( ) {
229- gum:: trace!(
230- target: LOG_TARGET ,
231- ?session,
232- ?candidate_hash,
233- ?valid,
234- "Issuing local statement based on participation outcome."
235- ) ;
236- self . issue_local_statement (
237- ctx,
238- & mut overlay_db,
217+ let confirm_write =
218+ match MuxedMessage :: receive ( ctx, & mut self . participation_receiver ) . await ? {
219+ MuxedMessage :: Participation ( msg) => {
220+ gum:: trace!( target: LOG_TARGET , "MuxedMessage::Participation" ) ;
221+ let ParticipationStatement {
222+ session,
239223 candidate_hash,
240224 candidate_receipt,
241- session,
242- valid,
243- clock. now ( ) ,
244- )
245- . await ?;
246- } else {
247- gum:: warn!( target: LOG_TARGET , ?outcome, "Dispute participation failed" ) ;
248- }
249- default_confirm
250- } ,
251- MuxedMessage :: Subsystem ( msg) => match msg {
252- FromOrchestra :: Signal ( OverseerSignal :: Conclude ) => return Ok ( ( ) ) ,
253- FromOrchestra :: Signal ( OverseerSignal :: ActiveLeaves ( update) ) => {
254- gum:: trace!( target: LOG_TARGET , "OverseerSignal::ActiveLeaves" ) ;
255- self . process_active_leaves_update (
256- ctx,
257- & mut overlay_db,
258- update,
259- clock. now ( ) ,
260- )
261- . await ?;
225+ outcome,
226+ } = self . participation . get_participation_result ( ctx, msg) . await ?;
227+ if let Some ( valid) = outcome. validity ( ) {
228+ gum:: trace!(
229+ target: LOG_TARGET ,
230+ ?session,
231+ ?candidate_hash,
232+ ?valid,
233+ "Issuing local statement based on participation outcome."
234+ ) ;
235+ self . issue_local_statement (
236+ ctx,
237+ & mut overlay_db,
238+ candidate_hash,
239+ candidate_receipt,
240+ session,
241+ valid,
242+ clock. now ( ) ,
243+ )
244+ . await ?;
245+ } else {
246+ gum:: warn!( target: LOG_TARGET , ?outcome, "Dispute participation failed" ) ;
247+ }
262248 default_confirm
263249 } ,
264- FromOrchestra :: Signal ( OverseerSignal :: BlockFinalized ( _, n) ) => {
265- gum:: trace!( target: LOG_TARGET , "OverseerSignal::BlockFinalized" ) ;
266- self . scraper . process_finalized_block ( & n) ;
267- default_confirm
250+ MuxedMessage :: Subsystem ( msg) => match msg {
251+ FromOrchestra :: Signal ( OverseerSignal :: Conclude ) => return Ok ( ( ) ) ,
252+ FromOrchestra :: Signal ( OverseerSignal :: ActiveLeaves ( update) ) => {
253+ gum:: trace!( target: LOG_TARGET , "OverseerSignal::ActiveLeaves" ) ;
254+ self . process_active_leaves_update (
255+ ctx,
256+ & mut overlay_db,
257+ update,
258+ clock. now ( ) ,
259+ )
260+ . await ?;
261+ default_confirm
262+ } ,
263+ FromOrchestra :: Signal ( OverseerSignal :: BlockFinalized ( _, n) ) => {
264+ gum:: trace!( target: LOG_TARGET , "OverseerSignal::BlockFinalized" ) ;
265+ self . scraper . process_finalized_block ( & n) ;
266+ default_confirm
267+ } ,
268+ FromOrchestra :: Communication { msg } =>
269+ self . handle_incoming ( ctx, & mut overlay_db, msg, clock. now ( ) ) . await ?,
268270 } ,
269- FromOrchestra :: Communication { msg } =>
270- self . handle_incoming ( ctx, & mut overlay_db, msg, clock. now ( ) ) . await ?,
271- } ,
272- } ;
271+ } ;
273272
274273 if !overlay_db. is_empty ( ) {
275274 let ops = overlay_db. into_write_ops ( ) ;
0 commit comments