From: Matt Corallo <649246+TheBlueMatt@users.noreply.github.com> Date: Mon, 14 Aug 2023 18:47:11 +0000 (+0000) Subject: Merge pull request #116 from wpaulino/anchors X-Git-Url: http://git.bitcoin.ninja/index.cgi?a=commitdiff_plain;h=0be8a1b35092b7ff8f1ac0a2efb8708e5a18a80c;hp=e586047c7d89deeeb1175207e02a104a009604ba;p=ldk-sample Merge pull request #116 from wpaulino/anchors Add support for opening anchor outputs channels --- diff --git a/src/cli.rs b/src/cli.rs index dab8bac..10dce92 100644 --- a/src/cli.rs +++ b/src/cli.rs @@ -373,14 +373,14 @@ pub(crate) async fn poll_for_user_input( "listpeers" => list_peers(peer_manager.clone()), "signmessage" => { const MSG_STARTPOS: usize = "signmessage".len() + 1; - if line.as_bytes().len() <= MSG_STARTPOS { + if line.trim().as_bytes().len() <= MSG_STARTPOS { println!("ERROR: signmsg requires a message"); continue; } println!( "{:?}", lightning::util::message_signing::sign( - &line.as_bytes()[MSG_STARTPOS..], + &line.trim().as_bytes()[MSG_STARTPOS..], &keys_manager.get_node_secret_key() ) );