Commit Graph

23 Commits

Author SHA1 Message Date
Olaoluwa Osuntokun
b89a39d341
config: set chain directory _after_ the command line+config has been parsed
This commit fixes a bug introduced by the new multi-chain features of
and which disallowed multiple nodes from beings started locally.
Previously if two local nodes were set to, the _same_ chain, then
they’d both share the same chain data directory which would prevent one
of the nodes from being able to start up properly.
2017-05-02 20:29:14 -07:00
Olaoluwa Osuntokun
60f43cecf4
config: modify configuration to be aware of multi-chain paramters
This commit modifies the existing configuration to create instances
that are capable of housing configuration options for a particular
chain such as the rpcuser or rpcpass to distinct structures within
greater configuration. With this new change, it will now be possible
for lnd to be resident on either the litecoin testnets, with simple a
toggle in the main configuration.

The new configuration file will look like the following:
   [Bitcoin]
   bitcoin.active
   bitcoin.testnet=1
   bitcoin.rpcuser=kek
   bitcoin.rpcuass=kek

Similarly, one would mirror a similar set up in order to be active on
the latest litecoin testnet.
2017-05-02 19:57:49 -07:00
Faris Amali Alis
5e7655be54 docker: update instructions and Dockerfile for recent p2p port change
Error `connection refused` was thrown when user tries to get "Alice" to
connect to "Bob" node due to port mismatch introduced in this change [1]
here.

This commit updates the port value to reflect the new change introduced in
[1].

Reference: [1]
72772ce4df

Chanes in this commit:
  * Update references to old port value
  * Omit specifying port during lncli connect
  * Fix typo
2017-04-04 14:28:05 +02:00
Olaoluwa Osuntokun
58690d96f2
config: add automatic btcd RPC configuration for testnet
A common pitfall with new users setting up lnd on test net has been
observed to be the initial RPC credential set up between btcd and lnd.
As of a recent version of btcd now performs automatic RPC credential
set up by generating a random rpcuser and rpcpass on start up.

We now take advantage of this by reading the RPC credentials (if
possible and running in simmer mode). As a result, it is now possible
to simply run: `lnd—testnet` assuming a fresh installation of bcd (with
a set btcd.conf).

Fixes #68.
2017-04-01 20:14:16 +02:00
Olaoluwa Osuntokun
72772ce4df
config+lnd: the default p2p port is now 5656 2017-03-29 21:19:27 -07:00
Trevin Hofmann
40c7bac3aa multi: fix a variety of typos throughout the repo 2017-01-17 17:02:56 -08:00
Olaoluwa Osuntokun
d7a050b353
config: remove deprecated configuration parameters 2017-01-16 17:29:17 -08:00
Olaoluwa Osuntokun
ad76899a57
config+test: use default port for RPC server if one isn't specified
This commit alters the configuration parsing a bit along with the
documentation to expect the RPCHost configuration paramter to also have
the target port specified. If the port isn’t included, then the default
btcd RPC port for that chain is used.

Additionally, within the integration testing framework, when creating
the lnd nodes, we now use the configuration from the btcd harness to
set the proper RPC host.
2017-01-05 13:18:26 -08:00
Olaoluwa Osuntokun
8fe5c09e21
lnd: remove support for the now obsolete SegNet4 2017-01-05 13:08:15 -08:00
Olaoluwa Osuntokun
bd89a9312d
lnd: switch to using the connmgr for listening and persistent conns
This commit revamps the way in bound and outbound connections are
handled within lnd. Instead of manually managing listening goroutines
and also outbound connections, all the duty is now assigned to the
connmgr, a new btcsuite package.

The connmgr now handles accepting inbound (brontide) connections and
communicates with the server to hand off new connections via a
callback. Additionally, any outbound connection attempt is now made
persistent by default, with the assumption that (for right now),
connections are only to be made to peers we wish to make connections
to. Finally, on start-up we now attempt to connection to all/any of our
direct channel counter parties in order to promote the availability of
our channels to the daemon itself and any RPC users.
2016-12-14 18:15:55 -08:00
Andrey Samokhvalov
19d8abade8 config: add --pendingchannel lnd flag 2016-10-22 02:11:18 +03:00
Olaoluwa Osuntokun
39c9dfb9e4
config: add a new --debughtlc config parameter
This commit adds a new configuration parameter to the deamon:
‘DebugHTLC’. When true, all outgoing HTLC’s sent via the RPC interface
will be sent paying to a special rHash value which all lnd nodes also
with the flag activated know the preimage to. Therefore all payments
sent to a 1-hop node will immediately be settled by that node.

By default, this flag is false, it it only intended to be used to
exercise local changes to 1-hop behavior manually.
2016-09-21 19:48:25 -07:00
Olaoluwa Osuntokun
0085e2a38a
config: add an option to pass in a hex-encoded rpc cert (--rawrpccert)
This commit adds an option to pass in a raw hex-encoded rpc cert via
lnd’s configuration file. Such a change allows for programmatically
creating lnd nodes which can connect to an existing btcd instance
without requiring a file for the rpc cert to be specified.
Additionally, this commit makes the creation of an integration testing
harness easier.
2016-08-29 21:39:06 -07:00
Olaoluwa Osuntokun
a03126ed83
config: remove rpckey parameter 2016-08-29 21:33:12 -07:00
Olaoluwa Osuntokun
06f32cd5bc
lnd: drop the port from the default rpc host
Drop the port from the default RPC host as the proper port will be
filled in depending on which net is chosen.
2016-07-24 16:38:52 -07:00
Olaoluwa Osuntokun
a56ab46e97
lnd: properly switch RPC port with target net change
With this commit, support for changing the target network (testnet,
simnet, etc) has been finalized. Previously a command line option was
present to swap networks, but the RPC port wouldn’t automatically be
updated to reflect the network.
2016-07-13 18:37:59 -07:00
Olaoluwa Osuntokun
cad0d54e43
lnd: make the http profiling server optional w/ a config param 2016-06-21 13:12:51 -07:00
Olaoluwa Osuntokun
fcff17c336
multi: change all imports to roasbeef's forks
This commit will allow the general public to build lnd without jumping
through hoops setting up their local git branches nicely with all of
our forks.
2016-05-15 17:22:37 +03:00
Olaoluwa Osuntokun
3e3c028313 default net params to segnet4 2016-04-24 12:36:45 -07:00
Olaoluwa Osuntokun
670d441dea finalize initial draft of config.go
lnd now supports parsing configuration via the command line, and its
dedicated AppDataDir
2016-03-22 18:44:17 -07:00
Olaoluwa Osuntokun
90063e1431 run go fmt on config file 2016-03-22 13:30:54 -07:00
mkl
e07086a523 Integrate basic configuration functionality 2016-03-22 13:28:56 -07:00
Olaoluwa Osuntokun
a10a678505 add some daemon related skeleton files 2015-12-26 00:09:17 -06:00