Skip to content

Commit

Permalink
Remove unnecessary comment + edit weird docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
woocash2 committed Aug 17, 2023
1 parent 2d999ae commit 8684667
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
10 changes: 5 additions & 5 deletions consensus/src/alerts/handler.rs
Original file line number Diff line number Diff line change
Expand Up @@ -161,7 +161,7 @@ impl<H: Hasher, D: Data, MK: MultiKeychain> Handler<H, D, MK> {
Ok(())
}

/// `rmc_alert()` registers the RMC but does not actually send it; the returned hash must be passed to `start_rmc()` separately
/// Registers the RMC but does not actually send it; the returned hash must be passed to `start_rmc()` separately
fn rmc_alert(
&mut self,
forker: NodeIndex,
Expand All @@ -174,7 +174,7 @@ impl<H: Hasher, D: Data, MK: MultiKeychain> Handler<H, D, MK> {
hash
}

/// `on_own_alert()` registers RMCs and messages but does not actually send them; make sure the returned values are forwarded to IO
/// Registers RMCs and messages but does not actually send them; make sure the returned values are forwarded to IO
pub fn on_own_alert(
&mut self,
alert: Alert<H, D, MK::Signature>,
Expand All @@ -190,7 +190,7 @@ impl<H: Hasher, D: Data, MK: MultiKeychain> Handler<H, D, MK> {
)
}

/// `on_network_alert()` may return a `ForkingNotification`, which should be propagated
/// May return a `ForkingNotification`, which should be propagated
pub fn on_network_alert(
&mut self,
alert: UncheckedSigned<Alert<H, D, MK::Signature>, MK::Signature>,
Expand Down Expand Up @@ -220,7 +220,7 @@ impl<H: Hasher, D: Data, MK: MultiKeychain> Handler<H, D, MK> {
Ok((propagate_alert, hash_for_rmc))
}

/// `on_message()` may return an `AlerterResponse` which should be propagated
/// May return an `AlerterResponse` which should be propagated
pub fn on_message(
&mut self,
message: AlertMessage<H, D, MK::Signature, MK::PartialMultisignature>,
Expand Down Expand Up @@ -256,7 +256,7 @@ impl<H: Hasher, D: Data, MK: MultiKeychain> Handler<H, D, MK> {
}
}

/// `alert_confirmed()` may return a `ForkingNotification`, which should be propagated
/// May return a `ForkingNotification`, which should be propagated
pub fn alert_confirmed(
&mut self,
multisigned: Multisigned<H::Hash, MK>,
Expand Down
2 changes: 0 additions & 2 deletions consensus/src/alerts/service.rs
Original file line number Diff line number Diff line change
Expand Up @@ -165,8 +165,6 @@ impl<H: Hasher, D: Data, MK: MultiKeychain> Service<H, D, MK> {
}
}

// main loop

pub async fn run(&mut self, mut handler: Handler<H, D, MK>, mut terminator: Terminator) {
loop {
futures::select! {
Expand Down

0 comments on commit 8684667

Please sign in to comment.