Skip to content

Commit 48a15b2

Browse files
f - Add by_id and short_to_chan_info consistency guarantees comment
1 parent f84c008 commit 48a15b2

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

lightning/src/ln/channelmanager.rs

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2569,6 +2569,9 @@ impl<M: Deref, T: Deref, K: Deref, F: Deref, L: Deref> ChannelManager<M, T, K, F
25692569
None => { insert_outbound_payment!(); },
25702570
}
25712571
} else {
2572+
// The channel was likely removed after we fetched the id from the
2573+
// `short_to_chan_info` map, but before we successfully locked the `by_id` map.
2574+
// This can occur as no consistency guarantees exists between the two maps.
25722575
return Err(APIError::ChannelUnavailable{err: "No channel available with first hop!".to_owned()});
25732576
}
25742577
return Ok(());

0 commit comments

Comments
 (0)