lightningdevkit / ldk-sample

Sample node implementation using LDK
Apache License 2.0
166 stars 94 forks source link

Can't start: `thread 'main' panicked at 'invalid digit found in string', src/cli.rs:73:25` #33

Closed sangaman closed 3 years ago

sangaman commented 3 years ago

I'm trying to run against a regtest node according to the README but I'm hitting this error. I get it with or without specifying a port explicitly. Am I doing something wrong or is this a bug?

$ cargo run user:pass@127.0.0.1:18443 ~/.ldk regtest
    Finished dev [unoptimized + debuginfo] target(s) in 0.03s
     Running `target/debug/ldk-tutorial-node 'user:pass@127.0.0.1:18443' /home/danielmcnally/.ldk regtest`
thread 'main' panicked at 'invalid digit found in string', src/cli.rs:73:25
stack backtrace:
   0: rust_begin_unwind
             at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/std/src/panicking.rs:515:5
   1: std::panicking::begin_panic_fmt
             at /rustc/a178d0322ce20e33eac124758e837cbd80a6f633/library/std/src/panicking.rs:457:5
   2: ldk_tutorial_node::cli::parse_startup_args
             at ./src/cli.rs:73:19
note: Some details are omitted, run with `RUST_BACKTRACE=full` for a verbose backtrace.
Aborted (core dumped)
TheBlueMatt commented 3 years ago

Looks like we weren't correctly parsing args without a port but with a network. Should be fixed by #34 but in the mean time you can add a listen port and it should work.

sangaman commented 3 years ago

Looks like we weren't correctly parsing args without a port but with a network. Should be fixed by #34 but in the mean time you can add a listen port and it should work.

Thank you, I do get the same error though when I explicitly specify a port though like with cargo run user:pass@127.0.0.1:18443 ~/.ldk regtest 9735. I'll check out the PR.

Edit: My apologies, I was switching the listen port and network flipped which is why it wasn't working even when I specified a port.

TheBlueMatt commented 3 years ago

cargo run @.***:18443 ~/.ldk regtest 9735.

The port should appear before “regtest”.

On Aug 26, 2021, at 07:35, Daniel McNally @.***> wrote:

with cargo run @.***:18443 ~/.ldk regtest 9735. I'll check out the PR.

sangaman commented 3 years ago

Yep I realized that shortly after I made my last comment, when I tried to run two instances on two different ports and got an error for a port being in use. But all good now, TY again.