Rusty Russell
e2dc10f98d
lightningd: pay support.
The previous code was very tied to the old daemon, so this copies a large
part of it.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
f3dbc75eb3
lightningd: send message on HTLC failure, relay to peer.
We don't do the encryption wrapping we're supposed to do yet.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
1c0b43f04d
channel: tell master about the HTLC fulfillment.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
86da7c3a4d
lightningd/channel: send and receive htlc_fulfilled messages.
Includes a fix for the direction we fulfill.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
85fd8218e2
lightningd: track channel balance.
This is an approximate result (it's only our confirmed balance, not showing
outstanding HTLCs), but it gives an easy way to check HTLCs have been
resolved.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
be4af38d0c
channel: unwrap and send incoming HTLCs to master.
So far it just looks it up, marks it resolved, then does nothing.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
d3cbde4b46
lightningd/channel: send and receive revoke_and_ack packets.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
64b50e5cb6
lightningd/channel: handle adding HTLC, generalize handler.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
47da80fdca
lightningd: dev_newhtlc command.
For testing point-to-point HTLCs.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
9014f2593e
lightningd/channel: normal operation daemon.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
9eeb76e185
lightningd: broadcast transaction once we're told to.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
fd258fe495
lightningd: wire up opening daemon.
Now we can actually open a channel.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
5475666b7e
lightningd: simple wallet support.
This allows us to add funds via the P2SH-wrapped Segwit Transactions.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
1e34e5344d
lightningd/lightningd: add getpeers command.
This has an optional log level if you want to see logs for the peers.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
7aaffda779
lightningd/lightningd: finish connect command once gossip started.
This is after the INIT message is received, so we know there are no
incompatible features.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
6f5fed17d8
lightningd/test: simple black-box tests.
These use the same infrastructure as the daemon/test blackbox tests,
so they're not currently wired into make check; use make
"lightningd-blackbox-tests".
8 years ago