main/lntest: factor out node config options, add options for bitcoind

This commit factors out the btcd and ltcd options into their own sections
similar to neutrino, and adds a bitcoind section as well. Now, you specify
node options similarly to:

--ltcd.rpchost=...
or
--btcd.rpcuser=...
or
--bitcoind.zmqpath=...

For Bitcoin, you specify an alternate back-end to btcd as follows:

--bitcoin.node=bitcoind
or
--bitcoin.node=neutrino

You can also specify the default option:
--bitcoin.node=btcd

For Litecoin, only `btcd` mode is valid, and corresponds to the `ltcd`
section. For example:

--litecoin.node=btcd
--ltcd.rpchost=...

The new code also attempts to read the correct options and auth info
from bitcoin.conf just as it does from btcd.conf/ltcd.conf.
This commit is contained in:
Alex
2017-12-21 22:23:24 -07:00
committed by Olaoluwa Osuntokun
parent 187f59556a
commit 9a02884d0b
7 changed files with 398 additions and 115 deletions

View File

@ -183,6 +183,11 @@ type mockWalletController struct {
publishedTransactions chan *wire.MsgTx
}
// BackEnd returns "mock" to signify a mock wallet controller.
func (*mockWalletController) BackEnd() string {
return "mock"
}
// FetchInputInfo will be called to get info about the inputs to the funding
// transaction.
func (*mockWalletController) FetchInputInfo(