projects
/
ldk-sample
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge pull request #55 from TheBlueMatt/2022-03-node-alias
[ldk-sample]
/
src
/
cli.rs
diff --git
a/src/cli.rs
b/src/cli.rs
index d6ffa5d96f2edf818bd7fcfee07bc9aa42413c8a..681714f17936093dc218c4411df1bce0b27b5b97 100644
(file)
--- a/
src/cli.rs
+++ b/
src/cli.rs
@@
-321,8
+321,8
@@
pub(crate) async fn poll_for_user_input<E: EventHandler>(
continue;
}
let channel_id_vec = hex_utils::to_vec(channel_id_str.unwrap());
continue;
}
let channel_id_vec = hex_utils::to_vec(channel_id_str.unwrap());
- if channel_id_vec.is_none() {
- println!("ERROR: couldn't parse channel_id
as hex
");
+ if channel_id_vec.is_none()
|| channel_id_vec.as_ref().unwrap().len() != 32
{
+ println!("ERROR: couldn't parse channel_id");
continue;
}
let mut channel_id = [0; 32];
continue;
}
let mut channel_id = [0; 32];
@@
-336,8
+336,8
@@
pub(crate) async fn poll_for_user_input<E: EventHandler>(
continue;
}
let channel_id_vec = hex_utils::to_vec(channel_id_str.unwrap());
continue;
}
let channel_id_vec = hex_utils::to_vec(channel_id_str.unwrap());
- if channel_id_vec.is_none() {
- println!("ERROR: couldn't parse channel_id
as hex
");
+ if channel_id_vec.is_none()
|| channel_id_vec.as_ref().unwrap().len() != 32
{
+ println!("ERROR: couldn't parse channel_id");
continue;
}
let mut channel_id = [0; 32];
continue;
}
let mut channel_id = [0; 32];