bitcoind: Respect testnet for bitcoin-cli

This commit is contained in:
Christian Decker 2017-05-12 12:42:07 +02:00 committed by Rusty Russell
parent 80486a6669
commit 3f4e43081c

View File

@ -130,6 +130,7 @@ static struct lightningd *new_lightningd(const tal_t *ctx)
ld->dstate.announce = NULL;
ld->topology = ld->dstate.topology = new_topology(ld, ld->log);
ld->bitcoind = ld->dstate.bitcoind = new_bitcoind(ld, ld->log);
ld->bitcoind->testmode = ld->dstate.testnet?BITCOIND_TESTNET:BITCOIND_MAINNET;
/* FIXME: Move into invoice daemon. */
ld->dstate.invoices = invoices_init(&ld->dstate);