bitcoin-dev-project/sim-ln

Not the best error message when I added a pubkey for a node that didn't exist in the config file

Closed this issue · 2 comments

I made a mistake in my config file and used a wrong pubkey. This is the error message I got:

2023-09-11T14:14:18.934Z INFO [sim_cli] Connected to 0248efcfe94e3c451f49 - Node ID: 0248efcfe94e3c451f4995b471ef0707163f279d4681af23727279c9c696004b42
2023-09-11T14:14:18.959Z INFO [sim_cli] Connected to STRANGEFARM-v23.05.1 - Node ID: 0221b76f4cce7ab42538127022bac6245e999804ab5901813d9337d5cadd6428df
2023-09-11T14:14:18.960Z INFO [sim_lib] Running the simulation forever
Error: Lightning Error: GetNodeInfoError("Get node info error Node not found")

Caused by:
    Get node info error Get node info error Node not found

Took me a second to realise it was because I used the wrong pubkey.

@maxwedwards, the proposed fix would have shown you the error below. Would this have been sufficient to indicate you have the wrong (but valid) pubkey as a destination?

2023-09-19T23:51:12.192Z INFO [sim_cli] Connected to alice - Node ID: 023d45dc57ed99e6d793e2fed8dcf79d2f6ad2f32ec31b48102de445e245e08336.
2023-09-19T23:51:12.196Z INFO [sim_cli] Connected to bob - Node ID: 02c0c854f511082f9d174f9b0e51ca14fc299c25de9d65dddadebe9ac1fd529758.
2023-09-19T23:51:12.196Z INFO [sim_lib] Running the simulation forever.
Error: Lightning Error: ValidationError("could not get node features for destination node 02e312385bf63667f8c3589146d4fd78e14975c3ba94afe7d1f5f7bb3b73e63c7c")

Caused by:
    Config validation failed could not get node features for destination node 02e312385bf63667f8c3589146d4fd78e14975c3ba94afe7d1f5f7bb3b73e63c7c

The error is saying that it couldn't get node features but that's not the problem right? Perhaps something like:

Config validation failed: No config found for destination node 02e312385bf63667f8c3589146d4fd78e14975c3ba94afe7d1f5f7bb3b73e63c7c.

or

Config validation failed: Destination node 02e312385bf63667f8c3589146d4fd78e14975c3ba94afe7d1f5f7bb3b73e63c7c is unknown.