Skip to content

Commit

Permalink
v1.17: Uses Display for error in VerifyAccountsHashInBackground's pan…
Browse files Browse the repository at this point in the history
…ic message (backport of #34219) (#34224)

Uses Display for error in VerifyAccountsHashInBackground's panic message (#34219)

(cherry picked from commit deee5f8)

Co-authored-by: Brooks <brooks@solana.com>
  • Loading branch information
mergify[bot] and brooksprumo authored Nov 27, 2023
1 parent 75b59c1 commit b12ee21
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions accounts-db/src/verify_accounts_hash_in_background.rs
Original file line number Diff line number Diff line change
Expand Up @@ -67,7 +67,7 @@ impl VerifyAccountsHashInBackground {
}
let result = lock.take().unwrap().join().unwrap();
if !result {
panic!("initial hash verification failed: {result:?}");
panic!("initial background accounts hash verification failed: {result}");
}
// we never have to check again
self.verification_complete();
Expand Down Expand Up @@ -139,7 +139,7 @@ pub mod tests {
}

#[test]
#[should_panic(expected = "initial hash verification failed")]
#[should_panic(expected = "initial background accounts hash verification failed")]
fn test_panic() {
let verify = Arc::new(VerifyAccountsHashInBackground::default());
start_thread_and_return(&verify, false, || {});
Expand Down

0 comments on commit b12ee21

Please sign in to comment.