Open plebhash opened 7 months ago
this line is being executed before bitcoind
has been initialized, resulting in the following error log:
error: timeout on transient error: Could not connect to the server 127.0.0.1:18443
Make sure the bitcoind server is running and that you are connecting to the correct RPC port.
Re-running nix develop
one more time makes this error go away. Even though this is the expected behavior, it is confusing to the user.
I guess an easy fix would be to simply suppress the error logs coming out of getblockcount
failed RPC by redirecting its stderr
to /dev/null
:
- blockcount=$(btc getblockcount) || { blockcount=-1; }
+ blockcount=$(btc getblockcount 2>/dev/null) || { blockcount=-1; }
That would avoid confusing the user with a false alarm.
This line is generating the following error log:
error code: -18
error message:
Wallet file verification failed. Failed to load database path '/tmp/cashu-rs-mint/bitcoin/regtest/wallets/test'. Path does not exist.
Running nix develop
one more time changes the error log to:
error code: -35
error message:
Wallet "test" is already loaded.
error code: -4
error message:
Wallet file verification failed. Failed to create database path '/tmp/cashu-rs-mint/bitcoin/regtest/wallets/test'. Database already exists.
Wallet already loaded
I still don't have any concrete suggestion on how to fix this.
This line is generating the following error log:
lightning-cli: Moving into '/tmp/cashu-rs-mint/lighting/ln_1/regtest': No such file or directory
Running nix develop
one more time makes the error go away. This could also be mitigated by redirecting stderr
to /dev/null
:
- ln_1_info=$(ln1 getinfo) || { ln_1_info=-1; }
+ ln_1_info=$(ln1 getinfo 2>/dev/null) || { ln_1_info=-1; }
The same could also be applied to the ln_2
instance of this same command.
Hey, yes thanks for this you make some good points. I'll implement your suggestions to clean up the flake a bit.
I'm running a x86-64 VM with a fresh NixOS 23.11.6359.53a2c32bc66f (Tapir)
The
shellHook
insideflake.nix
generates some confusing outputs: