Skip to content

Commit

Permalink
handle error
Browse files Browse the repository at this point in the history
  • Loading branch information
Zacholme7 committed Feb 3, 2025
1 parent f664370 commit 07797e6
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions anchor/common/qbft/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -891,10 +891,12 @@ where
// Just want to take the first one that is valid and has a prepared value
for wrapped_round_change in round_change_msg {
// Deserialize into a qbft message for sanity checks
let round_change: QbftMessage = QbftMessage::from_ssz_bytes(
let round_change: QbftMessage = match QbftMessage::from_ssz_bytes(
wrapped_round_change.signed_message.ssv_message().data(),
)
.unwrap();
) {
Ok(data) => data,
Err(_) => return (vec![], None),
};

// Round sanity check
let current_round_proposal = self.proposal_accepted_for_current_round
Expand Down

0 comments on commit 07797e6

Please sign in to comment.