From 7bc276d534c6c758ac2cfefe96431c2b1318ca01 Mon Sep 17 00:00:00 2001 From: benr-ml <112846738+benr-ml@users.noreply.github.com> Date: Sun, 21 Jul 2024 07:42:05 +0300 Subject: [PATCH] [beacon] Print a fixed error message instead of a panic (#18751) ## Description Describe the changes or additions included in this PR. ## Test plan How did you test the new or updated feature? --- ## Release notes Check each box that your changes affect. If none of the boxes relate to your changes, release notes aren't required. For each box you select, include information after the relevant heading that describes the impact of your changes that a user might notice and any actions they must take to implement updates. - [ ] Protocol: - [ ] Nodes (Validators and Full nodes): - [ ] Indexer: - [ ] JSON-RPC: - [ ] GraphQL: - [ ] CLI: - [ ] Rust SDK: - [ ] REST API: --- crates/sui-types/src/messages_consensus.rs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/crates/sui-types/src/messages_consensus.rs b/crates/sui-types/src/messages_consensus.rs index 169b64f8ccdc2..5a55f18b5b5aa 100644 --- a/crates/sui-types/src/messages_consensus.rs +++ b/crates/sui-types/src/messages_consensus.rs @@ -301,7 +301,7 @@ pub enum VersionedDkgConfirmation { impl Debug for VersionedDkgMessage { fn fmt(&self, f: &mut Formatter<'_>) -> std::fmt::Result { match self { - VersionedDkgMessage::V0() => panic!("BUG: invalid VersionedDkgMessage version"), + VersionedDkgMessage::V0() => write!(f, "Deprecated VersionedDkgMessage version 0"), VersionedDkgMessage::V1(msg) => write!( f, "DKG V1 Message with sender={}, vss_pk.degree={}, encrypted_shares.len()={}",