7
7
// You may not use this file except in accordance with one or both of these
8
8
// licenses.
9
9
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
11
13
12
14
use core:: convert:: TryInto ;
13
15
use core:: ops:: Deref ;
14
16
15
17
use crate :: chain:: chaininterface:: BroadcasterInterface ;
16
18
use crate :: chain:: ClaimId ;
17
- use crate :: events:: Event ;
18
19
use crate :: io_extras:: sink;
19
20
use crate :: ln:: chan_utils;
20
21
use crate :: ln:: chan_utils:: {
@@ -553,6 +554,8 @@ impl<W: Deref> CoinSelectionSource for Wallet<W> where W::Target: WalletSource {
553
554
/// A handler for [`Event::BumpTransaction`] events that sources confirmed UTXOs from a
554
555
/// [`CoinSelectionSource`] to fee bump transactions via Child-Pays-For-Parent (CPFP) or
555
556
/// Replace-By-Fee (RBF).
557
+ ///
558
+ /// [`Event::BumpTransaction`]: crate::events::Event::BumpTransaction
556
559
pub struct BumpTransactionEventHandler < B : Deref , C : Deref , SP : Deref , L : Deref >
557
560
where
558
561
B :: Target : BroadcasterInterface ,
@@ -575,6 +578,8 @@ where
575
578
L :: Target : Logger ,
576
579
{
577
580
/// Returns a new instance capable of handling [`Event::BumpTransaction`] events.
581
+ ///
582
+ /// [`Event::BumpTransaction`]: crate::events::Event::BumpTransaction
578
583
pub fn new ( broadcaster : B , utxo_source : C , signer_provider : SP , logger : L ) -> Self {
579
584
Self {
580
585
broadcaster,
@@ -749,13 +754,8 @@ where
749
754
Ok ( ( ) )
750
755
}
751
756
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 ) {
759
759
match event {
760
760
BumpTransactionEvent :: ChannelClose {
761
761
claim_id, package_target_feerate_sat_per_1000_weight, commitment_tx,
0 commit comments