Commit Graph

20 Commits

Author SHA1 Message Date
Olaoluwa Osuntokun e1d5878df4
lnd: introduce the InvoiceRegistry
This commit introduces the invoice registry which is a central
repository of all outstanding invoices related to the daemon.

This registry will be used by the goroutines which manage the htlc’s
for a particular channel, and later by the point-to-point workflow
which negotiates the conditions for payment along with signed recipes.
2016-07-12 17:14:16 -07:00
Olaoluwa Osuntokun 5fab6ea39e
lnd: redirect channel closure reqs from server to htlcSwitch 2016-07-09 16:36:31 -07:00
Olaoluwa Osuntokun c0383679d2
lnd: use asynchronous streaming responses for [open|close]channel RPC's
This commit switches the implementation of the open/close channel RPC’s
from a fully blocking synchronous model to one that’s async by default,
allowing callers to add a sync wrapper.

The new proto specs also allow for “updates” for the pending channels
in the form of new confirmations which progress the pending status of
the channel. At this point, only the final open/close updates have been
implemented. Obtaining confirmation notifications requires a bit of
re-working within the current ChainNotifier interface, thus this has
been deferred to a later time.
2016-07-07 15:31:07 -07:00
Olaoluwa Osuntokun 2512fecf88
lnd: populate lightning id within server 2016-07-05 18:49:08 -07:00
Olaoluwa Osuntokun 1188fd2bf6
lnd: implement open+close channel workflow in daemon
This commit adds the necessary plumbing within the server, peer, and
rpcServer to handle opening and cooperatively closing a channel with a
remote peer.

Many new data structures have been added to the peer in order to allow
it to efficiently manage opening+.losing new/existing lightning
channels. Additional documentation has been added to several methods
within the peer struct, with some minor renaming along with way. The
peer has also gained a dedicated goroutine whose job it is to manage
any requests pertaining to opening, or closing any channels with the
remote peer.

The messages have been added to lnrpc define the requests and responses
to channel open+close messages. Additional channel logic has been added
between the rpcServer, peer, and server in order to properly manage the
necessary synchronization.
2016-06-21 13:14:05 -07:00
Olaoluwa Osuntokun 9ef7e23384
lnd: implement connectpeer and listpeers RPC calls 2016-06-21 13:14:01 -07:00
Olaoluwa Osuntokun 913ae259de
lnwire: document commitment+HTLC update msgs
This commit adds some cursory documentation along wit minor field
modifications to all messages which deal with adding HTLC’s, or
updating remote commitment transactions.

The messages for dual funding of channel is left purposefully
undocumented as all initial negotiations will be single funder by
default.

A revamp of the testing infrastructure of lnwire will be committed in
the near future.
2016-05-23 13:54:41 -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 9982bf4c33 use lnwallet's Shutdown method instead of btcwallet's inner Stop 2016-04-24 12:40:40 -07:00
Olaoluwa Osuntokun 1dfe344c4d p2p listener should only log an error if not shutting down 2016-04-24 12:40:23 -07:00
Olaoluwa Osuntokun 555003006b add WaitForShutdown method to the server, additional logging 2016-03-22 18:49:22 -07:00
Tadge Dryja dd2c2274c8 export fields from lnid and add deserialization method 2016-01-19 00:05:02 -08:00
Tadge Dryja b0a402bc4f remove ID private key from LNDConn struct 2016-01-17 11:20:40 -08:00
Tadge Dryja 9e5f302288 move lnadr from main to lndc package 2016-01-17 10:45:07 -08:00
Olaoluwa Osuntokun 9a775cf66e add functionality to server for manually establishing outgoing connections 2016-01-16 19:28:19 -08:00
Olaoluwa Osuntokun 1f1b82fe3f add constructor for core server struct 2016-01-16 19:28:16 -08:00
Olaoluwa Osuntokun 7ecbb2debc move getPriv to server.go, and rename 2016-01-16 19:27:20 -08:00
Tadge Dryja d47105217b change imports to github.com/lightningnetwork/lnd 2016-01-16 10:38:48 -08:00
Olaoluwa Osuntokun 0c304cbb2f Flesh out the peer handling skeleton within peer/server 2016-01-14 23:58:04 -08:00
Olaoluwa Osuntokun a10a678505 add some daemon related skeleton files 2015-12-26 00:09:17 -06:00