Skip to content

Commit

Permalink
Remove two subtle bugs due to tlc data structure change
Browse files Browse the repository at this point in the history
  • Loading branch information
contrun committed Jun 12, 2024
1 parent 14d53a5 commit 0328ad0
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/ckb/channel.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1676,7 +1676,6 @@ impl ChannelActorState {
pub fn get_active_tlcs(&self) -> Vec<DetailedTLCInfo> {
self.tlcs
.values()
.chain(self.tlcs.values())
.cloned()
.filter_map(|detailed_tlc| {
if detailed_tlc.removal_info.is_none() {
Expand Down Expand Up @@ -1777,7 +1776,7 @@ impl ChannelActorState {
}

fn any_tlc_pending(&self) -> bool {
!self.tlcs.is_empty()
!self.get_active_tlcs().is_empty()
}

pub fn get_remote_funding_pubkey(&self) -> &Pubkey {
Expand Down

0 comments on commit 0328ad0

Please sign in to comment.