bitcoind: explicit flag to bitcoin-cli for testnet/regtest.

Three days of on and off debugging, before I realized my server was talking
to a non-testnet bitcoind.  There was a bitcoind on that machine running
on testnet, but it uses the same dir and config, so the --bitcoin-datadir
option couldn't help.

This is more certain: specify whether we're testnet on every single query.
Now we can skip the attempt to parse bitcoin.conf, too.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2016-10-07 14:00:16 +10:30
parent 8c8fa2cecd
commit b45b4eaba6
5 changed files with 16 additions and 52 deletions

View File

@@ -97,6 +97,4 @@ void bitcoind_getrawblock_(struct lightningd_state *dstate,
struct lightningd_state *, \
struct bitcoin_block *), \
(arg))
void check_bitcoind_config(struct lightningd_state *dstate);
#endif /* LIGHTNING_DAEMON_BITCOIND_H */