We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
2 parents 34a748c + 55dc47f commit d69af92Copy full SHA for d69af92
src/cli.rs
@@ -368,14 +368,14 @@ pub(crate) async fn poll_for_user_input(
368
"listpeers" => list_peers(peer_manager.clone()),
369
"signmessage" => {
370
const MSG_STARTPOS: usize = "signmessage".len() + 1;
371
- if line.as_bytes().len() <= MSG_STARTPOS {
+ if line.trim().as_bytes().len() <= MSG_STARTPOS {
372
println!("ERROR: signmsg requires a message");
373
continue;
374
}
375
println!(
376
"{:?}",
377
lightning::util::message_signing::sign(
378
- &line.as_bytes()[MSG_STARTPOS..],
+ &line.trim().as_bytes()[MSG_STARTPOS..],
379
&keys_manager.get_node_secret_key()
380
)
381
);
0 commit comments