Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

deduplicate types and redundant impls #144

Merged
merged 1 commit into from
Feb 17, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
126 changes: 35 additions & 91 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

10 changes: 6 additions & 4 deletions anchor/common/qbft/src/lib.rs
Original file line number Diff line number Diff line change
@@ -1,9 +1,11 @@
use crate::msg_container::MessageContainer;
use ssv_types::consensus::{QbftData, QbftMessage, QbftMessageType, UnsignedSSVMessage};
use ssv_types::message::{MessageID, MsgType, SSVMessage, SignedSSVMessage};
use ssv_types::message::{MsgType, SSVMessage, SignedSSVMessage};
use ssv_types::msgid::MessageId;
use ssv_types::OperatorId;
use ssz::{Decode, Encode};
use std::collections::HashMap;
use std::ops::Deref;
use std::sync::Arc;
use tracing::{debug, error, warn};
use types::Hash256;
Expand Down Expand Up @@ -75,7 +77,7 @@ where
/// The initial configuration used to establish this instance of QBFT.
config: Config<F>,
/// The identification of this QBFT instance
identifier: MessageID,
identifier: MessageId,
/// The instance height acts as an ID for the current instance and helps distinguish it from
/// other instances.
instance_height: InstanceHeight,
Expand Down Expand Up @@ -134,7 +136,7 @@ where

let mut qbft = Qbft {
config,
identifier: MessageID::new([0; 56]),
identifier: MessageId::from([0; 56]),
instance_height,

start_data_hash,
Expand Down Expand Up @@ -233,7 +235,7 @@ where
}

// Make sure there is only one signer and the signer is in our committee
let signer = if let [signer] = wrapped_msg.signed_message.operator_ids().as_slice() {
let signer = if let &[signer] = wrapped_msg.signed_message.operator_ids().deref() {
if !self.check_committee(&OperatorId::from(*signer)) {
warn!("Signer is not part of committee");
return None;
Expand Down
Loading