@@ -13,7 +13,7 @@ use acropolis_common::{
1313 stake_addresses:: AccountState ,
1414 BlockHash , BlockInfo , BlockStatus , Era ,
1515} ;
16- use anyhow:: { Result } ;
16+ use anyhow:: Result ;
1717use caryatid_sdk:: { module, Context , Module } ;
1818use config:: Config ;
1919use tokio:: time:: Instant ;
@@ -96,15 +96,18 @@ impl SnapshotHandler {
9696 }
9797
9898 async fn publish_start ( & self ) -> Result < ( ) > {
99- anyhow:: Context :: context ( self . context
100- . message_bus
101- . publish (
102- & self . snapshot_topic ,
103- Arc :: new ( Message :: Snapshot (
104- acropolis_common:: messages:: SnapshotMessage :: Startup ,
105- ) ) ,
106- )
107- . await , "Failed to publish start message" )
99+ anyhow:: Context :: context (
100+ self . context
101+ . message_bus
102+ . publish (
103+ & self . snapshot_topic ,
104+ Arc :: new ( Message :: Snapshot (
105+ acropolis_common:: messages:: SnapshotMessage :: Startup ,
106+ ) ) ,
107+ )
108+ . await ,
109+ "Failed to publish start message" ,
110+ )
108111 }
109112
110113 async fn publish_completion (
@@ -119,10 +122,10 @@ impl SnapshotHandler {
119122 } ) ,
120123 ) ) ;
121124
122- anyhow:: Context :: context ( self . context
123- . message_bus
124- . publish ( & self . snapshot_topic , Arc :: new ( message ) )
125- . await , "Failed to publish completion" )
125+ anyhow:: Context :: context (
126+ self . context . message_bus . publish ( & self . snapshot_topic , Arc :: new ( message ) ) . await ,
127+ "Failed to publish completion" ,
128+ )
126129 }
127130}
128131
0 commit comments