Skip to content

Commit a7579f4

Browse files
committed
Propagate VSS runtime construction errors
Replace the Tokio runtime builder unwrap with io::Error propagation so VSS startup failures surface through the constructor instead of panicking. Co-Authored-By: HAL 9000
1 parent 0102fdd commit a7579f4

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/io/vss_store.rs

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,9 @@ impl VssStore {
110110
.worker_threads(INTERNAL_RUNTIME_WORKERS)
111111
.max_blocking_threads(INTERNAL_RUNTIME_WORKERS)
112112
.build()
113-
.expect("tokio runtime build must succeed");
113+
.map_err(|e| {
114+
io::Error::new(io::ErrorKind::Other, format!("Failed to build VSS runtime: {}", e))
115+
})?;
114116

115117
let (data_encryption_key, obfuscation_master_key) =
116118
derive_data_encryption_and_obfuscation_keys(&vss_seed);

0 commit comments

Comments
 (0)