projects
/
rust-lightning
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Use live, not usable for list_usable_channels
[rust-lightning]
/
src
/
ln
/
channelmanager.rs
diff --git
a/src/ln/channelmanager.rs
b/src/ln/channelmanager.rs
index 8bc5bf88d9a9e8ba0e7241e5555fd574beb91932..b967a6774d1f98c721ea7bce305065643476df59 100644
(file)
--- a/
src/ln/channelmanager.rs
+++ b/
src/ln/channelmanager.rs
@@
-449,7
+449,10
@@
impl ChannelManager {
let channel_state = self.channel_state.lock().unwrap();
let mut res = Vec::with_capacity(channel_state.by_id.len());
for (channel_id, channel) in channel_state.by_id.iter() {
let channel_state = self.channel_state.lock().unwrap();
let mut res = Vec::with_capacity(channel_state.by_id.len());
for (channel_id, channel) in channel_state.by_id.iter() {
- if channel.is_usable() {
+ // Note we use is_live here instead of usable which leads to somewhat confused
+ // internal/external nomenclature, but that's ok cause that's probably what the user
+ // really wanted anyway.
+ if channel.is_live() {
res.push(ChannelDetails {
channel_id: (*channel_id).clone(),
short_channel_id: channel.get_short_channel_id(),
res.push(ChannelDetails {
channel_id: (*channel_id).clone(),
short_channel_id: channel.get_short_channel_id(),