Skip to content

Commit 69550f5

Browse files
committed
TESTING: add debug info on chain state load failure
1 parent 28c28ec commit 69550f5

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

linera-core/src/chain_worker/actor.rs

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -143,6 +143,7 @@ where
143143
{
144144
/// Spawns a new task to run the [`ChainWorkerActor`], returning an endpoint for sending
145145
/// requests to the worker.
146+
#[tracing::instrument(level = "debug", skip_all, fields(?chain_id))]
146147
pub async fn load(
147148
config: ChainWorkerConfig,
148149
storage: StorageClient,
@@ -169,10 +170,14 @@ where
169170
chain_id,
170171
service_runtime_endpoint,
171172
)
172-
.await?;
173+
.await;
174+
175+
if let Err(e) = &worker {
176+
tracing::warn!("error loading chain state: {e:?}");
177+
}
173178

174179
Ok(ChainWorkerActor {
175-
worker,
180+
worker: worker?,
176181
service_runtime_thread,
177182
})
178183
}
@@ -320,6 +325,8 @@ where
320325
}
321326
}
322327

328+
tracing::debug!("chain worker receiver closed: beginning cleanup");
329+
323330
if let Some(thread) = self.service_runtime_thread {
324331
drop(self.worker);
325332
thread

0 commit comments

Comments
 (0)