Commit Graph

330 Commits

Author SHA1 Message Date
Olaoluwa Osuntokun
07166fe88b
lnd: implement pendingchannels RPC
This commit implements the “pendingchannels” RPC within the rpcserver.
This RPC allows callers to receive details concerning the current
pending channels associated with the daemon. Pending channels are those
waiting for additional confirmations before they can be considered
opened/closed.

At the time of this commit, only open channels are shown. A future
commit will also add the confirmation updates, along with information
for close channels.
2016-07-07 15:33:58 -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
c5cc96a524
lnd: implement the getinfo RPC call 2016-07-05 18:57:14 -07:00
Olaoluwa Osuntokun
f3a6f8ffe6
lnd: implement the sendcoins RPC request
This commit implements the “send coins” RPC request which was
introduced at both the lnrpc and command line level in a prior commit.

A small refactoring has taken place w.r.t to sendmany+sendcoins in
order to eliminate some code duplication.
2016-06-29 11:31:34 -07:00
Olaoluwa Osuntokun
914159cb87
lnd: list active channels in response to listpeers cmd 2016-06-22 22:22:44 -07:00
Olaoluwa Osuntokun
7e09a70706
cmd/lncli: properly reverse user txid input
This commit fixes a bug introduced within a prior commit. The prior
commit failed to drollery reverse the txid string taken in as user
input, therefore in order to properly close a channel, the user needed
to manually reverse the txid themselves.

With this change, `wire.NewShaHashFromStr` is used which properly
reverses the string within the constructor. This allows the string
reported not be directly used to the close an active channel.

This commit also corrects a few logging messages.
2016-06-22 11:10:33 -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
c7e9bb8c58
lnrpc: implement wallet balance RPC call 2016-06-21 13:13:57 -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
bba8770bb4 lnrpc: add address type param to NewAddress
The new available address types are: regular p2pkh, p2wkh, and finally
p2wkh nested within p2sh. The latter address type will initially be
used to allow users to “fund” the lnd wallet.
2016-04-24 20:26:32 -07:00
Olaoluwa Osuntokun
555003006b add WaitForShutdown method to the server, additional logging 2016-03-22 18:49:22 -07:00
Olaoluwa Osuntokun
d9922dc76d update the rpcserver's SendMany method to new btcwallet API 2016-03-22 18:48:46 -07:00
Tadge Dryja
9e5f302288 move lnadr from main to lndc package 2016-01-17 10:45:07 -08:00
Olaoluwa Osuntokun
5cc8efaa43 implement the gRPC "ConnectPeer" function within rpcserver 2016-01-16 19:31:09 -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
85590e0f6c revert to testnet3 params 2016-01-16 11:11:43 -08:00
Tadge Dryja
e03e21ba80 add parse from string 2016-01-16 11:09:12 -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
Tadge Dryja
58f0bfe252 plasma daemon can connect, receive connections, and send chat msgs. 2016-01-14 23:56:10 -08:00
Tadge Dryja
5bafdc4bc6 rpc client can tell plasma to listen, it can listen & auth 2016-01-14 23:56:09 -08:00
Tadge Dryja
8504362c5e trying to store id pkh. Doesn't work; wallet creation never completes 2016-01-14 23:56:08 -08:00
Tadge Dryja
e70c6aa367 trying to store private identity key. Doesn't work. 2016-01-14 23:56:08 -08:00
Tadge Dryja
8bd8293c8c can send messages from shell over grpc. doesn't do anything yet. 2016-01-14 23:56:07 -08:00
Tadge Dryja
31f3df2183 add gitignore, cli shell 2015-12-30 16:19:09 -04:00
Olaoluwa Osuntokun
0620580937 rpcserver: add compile time interface assertion 2015-12-29 17:21:42 -06:00
Olaoluwa Osuntokun
2c42fdb629 rpcserver: server implementation for basic rpc commands 2015-12-29 17:09:38 -06:00
Olaoluwa Osuntokun
a10a678505 add some daemon related skeleton files 2015-12-26 00:09:17 -06:00