@@ -1816,8 +1816,8 @@ impl<Signer: WriteableEcdsaChannelSigner> ChannelMonitor<Signer> {
1816
1816
/// `ChannelMonitor`. This is used to determine if an HTLC was removed from the channel prior
1817
1817
/// to the `ChannelManager` having been persisted.
1818
1818
///
1819
- /// This is similar to [`Self::get_pending_outbound_htlcs `] except it includes HTLCs which were
1820
- /// resolved by this `ChannelMonitor`.
1819
+ /// This is similar to [`Self::get_pending_or_resolved_outbound_htlcs `] except it includes
1820
+ /// HTLCs which were resolved by this `ChannelMonitor`.
1821
1821
pub ( crate ) fn get_all_current_outbound_htlcs ( & self ) -> HashMap < HTLCSource , ( HTLCOutputInCommitment , Option < PaymentPreimage > ) > {
1822
1822
let mut res = HashMap :: new ( ) ;
1823
1823
// Just examine the available counterparty commitment transactions. See docs on
@@ -1846,7 +1846,7 @@ impl<Signer: WriteableEcdsaChannelSigner> ChannelMonitor<Signer> {
1846
1846
1847
1847
/// Gets the set of outbound HTLCs which are pending resolution in this channel.
1848
1848
/// This is used to reconstruct pending outbound payments on restart in the ChannelManager.
1849
- pub ( crate ) fn get_pending_outbound_htlcs ( & self ) -> HashMap < HTLCSource , ( HTLCOutputInCommitment , Option < PaymentPreimage > ) > {
1849
+ pub ( crate ) fn get_pending_or_resolved_outbound_htlcs ( & self ) -> HashMap < HTLCSource , ( HTLCOutputInCommitment , Option < PaymentPreimage > ) > {
1850
1850
let us = self . inner . lock ( ) . unwrap ( ) ;
1851
1851
// We're only concerned with the confirmation count of HTLC transactions, and don't
1852
1852
// actually care how many confirmations a commitment transaction may or may not have. Thus,
@@ -1895,10 +1895,8 @@ impl<Signer: WriteableEcdsaChannelSigner> ChannelMonitor<Signer> {
1895
1895
} else { false }
1896
1896
} ) ;
1897
1897
if !htlc_update_confd {
1898
- if us. counterparty_fulfilled_htlcs. get( & SentHTLCId :: from_source( source) ) . is_none( ) {
1899
- res. insert( source. clone( ) , ( htlc. clone( ) ,
1900
- us. counterparty_fulfilled_htlcs. get( & SentHTLCId :: from_source( source) ) . cloned( ) ) ) ;
1901
- }
1898
+ res. insert( source. clone( ) , ( htlc. clone( ) ,
1899
+ us. counterparty_fulfilled_htlcs. get( & SentHTLCId :: from_source( source) ) . cloned( ) ) ) ;
1902
1900
}
1903
1901
}
1904
1902
}
0 commit comments