Skip to content

Commit 6424fb2

Browse files
committed
thingz from jurvis' pr
1 parent d6aa1bc commit 6424fb2

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

lightning/src/ln/channel.rs

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5941,6 +5941,17 @@ impl<Signer: Sign> Channel<Signer> {
59415941
self.update_time_counter += 1;
59425942
(monitor_update, dropped_outbound_htlcs)
59435943
}
5944+
5945+
pub fn inflight_htlc_sources(&self) -> impl Iterator<Item=&HTLCSource> {
5946+
self.holding_cell_htlc_updates.iter()
5947+
.flat_map(|htlc_update| {
5948+
match htlc_update {
5949+
HTLCUpdateAwaitingACK::AddHTLC { source, .. } => { Some(source) }
5950+
_ => { None }
5951+
}
5952+
})
5953+
.chain(self.pending_outbound_htlcs.iter().map(|htlc| &htlc.source))
5954+
}
59445955
}
59455956

59465957
const SERIALIZATION_VERSION: u8 = 2;

0 commit comments

Comments
 (0)