From 60196db0acb51d15c1f34177a9542a0af2610e07 Mon Sep 17 00:00:00 2001 From: Brooks Date: Tue, 6 Aug 2024 14:37:08 -0400 Subject: [PATCH] Improves panic message if send() fails in streaming_unpack_snapshot() (#2459) (cherry picked from commit 427a18b22e65cc8f81a01350646731c98158188b) --- accounts-db/src/hardened_unpack.rs | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/accounts-db/src/hardened_unpack.rs b/accounts-db/src/hardened_unpack.rs index 39eca4f9cdf3d9..552b7a33ea19bd 100644 --- a/accounts-db/src/hardened_unpack.rs +++ b/accounts-db/src/hardened_unpack.rs @@ -335,7 +335,13 @@ pub fn streaming_unpack_snapshot( |_, _| {}, |entry_path_buf| { if entry_path_buf.is_file() { - sender.send(entry_path_buf).unwrap(); + let result = sender.send(entry_path_buf); + if let Err(err) = result { + panic!( + "failed to send path '{}' from unpacker to rebuilder: {err}", + err.0.display(), + ); + } } }, )