77// You may not use this file except in accordance with one or both of these
88// licenses.
99
10- //! Utitilies for bumping transactions originating from [`super::Event`]s.
10+ //! Utilities for bumping transactions originating from [`Event`]s.
11+ //!
12+ //! [`Event`]: crate::events::Event
1113
1214use core:: convert:: TryInto ;
1315use core:: ops:: Deref ;
1416
1517use crate :: chain:: chaininterface:: BroadcasterInterface ;
1618use crate :: chain:: ClaimId ;
17- use crate :: events:: Event ;
1819use crate :: io_extras:: sink;
1920use crate :: ln:: chan_utils;
2021use crate :: ln:: chan_utils:: {
@@ -553,6 +554,8 @@ impl<W: Deref> CoinSelectionSource for Wallet<W> where W::Target: WalletSource {
553554/// A handler for [`Event::BumpTransaction`] events that sources confirmed UTXOs from a
554555/// [`CoinSelectionSource`] to fee bump transactions via Child-Pays-For-Parent (CPFP) or
555556/// Replace-By-Fee (RBF).
557+ ///
558+ /// [`Event::BumpTransaction`]: crate::events::Event::BumpTransaction
556559pub struct BumpTransactionEventHandler < B : Deref , C : Deref , SP : Deref , L : Deref >
557560where
558561 B :: Target : BroadcasterInterface ,
@@ -575,6 +578,8 @@ where
575578 L :: Target : Logger ,
576579{
577580 /// Returns a new instance capable of handling [`Event::BumpTransaction`] events.
581+ ///
582+ /// [`Event::BumpTransaction`]: crate::events::Event::BumpTransaction
578583 pub fn new ( broadcaster : B , utxo_source : C , signer_provider : SP , logger : L ) -> Self {
579584 Self {
580585 broadcaster,
@@ -749,13 +754,8 @@ where
749754 Ok ( ( ) )
750755 }
751756
752- /// Handles all variants of [`BumpTransactionEvent`], immediately returning otherwise.
753- pub fn handle_event ( & self , event : & Event ) {
754- let event = if let Event :: BumpTransaction ( event) = event {
755- event
756- } else {
757- return ;
758- } ;
757+ /// Handles all variants of [`BumpTransactionEvent`].
758+ pub fn handle_event ( & self , event : & BumpTransactionEvent ) {
759759 match event {
760760 BumpTransactionEvent :: ChannelClose {
761761 claim_id, package_target_feerate_sat_per_1000_weight, commitment_tx,
0 commit comments