Skip to content

Commit

Permalink
switch to impl syntax for qbft
Browse files Browse the repository at this point in the history
  • Loading branch information
dknopik committed Feb 18, 2025
1 parent 1e4b689 commit 9f997f9
Showing 1 changed file with 4 additions and 5 deletions.
9 changes: 4 additions & 5 deletions anchor/qbft_manager/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -109,14 +109,13 @@ pub struct QbftManager {

impl QbftManager {
// Construct a new QBFT Manager
pub fn new<T>(
pub fn new(
processor: Senders,
operator_id: OperatorId,
slot_clock: T,
slot_clock: impl SlotClock + 'static,
key: Rsa<Private>,
network_tx: mpsc::UnboundedSender<SignedSSVMessage>,
) -> Result<Arc<Self>, QbftError>
where T: SlotClock + 'static {
) -> Result<Arc<Self>, QbftError> {
let pkey = Arc::new(PKey::from_rsa(key).expect("Failed to create PKey from RSA"));

let manager = Arc::new(QbftManager {
Expand Down Expand Up @@ -199,7 +198,7 @@ impl QbftManager {
}

// Long running cleaner that will remove instances that are no longer relevant
async fn cleaner<T: SlotClock>(self: Arc<Self>, slot_clock: T) {
async fn cleaner(self: Arc<Self>, slot_clock: impl SlotClock) {
while !self.processor.permitless.is_closed() {
sleep(
slot_clock
Expand Down

0 comments on commit 9f997f9

Please sign in to comment.