mirror of
https://github.com/ElementsProject/lightning.git
synced 2024-11-19 18:11:28 +01:00
Core Lightning — Lightning Network implementation focusing on spec compliance and performance
6821b4f31c
When a unilateral close occurs, we have to watch on-chain ("live") HTLCs. If the other side spends their HTLC output, we need to grab the rvalue. If it times out, we need to spend it back to ourselves. If we get an R value, we need to spend our own HTLC output back to ourselves. Because there are multiple HTLCs, this doesn't fit very neatly into a state machine. We divide into "have htlcs" and "don't have htlcs", and use a INPUT_NO_MORE_HTLCS once all htlcs are resolved to transition. Our test harness now tracks individual HTLCs, so we refined some inputs (in particular, it won't try to complete/timeout an HTLC before we have any). Signed-off-by: Rusty Russell <rusty@rustcorp.com.au> |
||
---|---|---|
bitcoin | ||
ccan | ||
doc | ||
secp256k1 | ||
test | ||
test-cli | ||
.gitignore | ||
close_tx.c | ||
close_tx.h | ||
commit_tx.c | ||
commit_tx.h | ||
find_p2sh_out.c | ||
find_p2sh_out.h | ||
funding.c | ||
funding.h | ||
LICENSE | ||
lightning.pb-c.c | ||
lightning.pb-c.h | ||
lightning.proto | ||
Makefile | ||
opt_bits.c | ||
opt_bits.h | ||
overflows.h | ||
permute_tx.c | ||
permute_tx.h | ||
pkt.c | ||
pkt.h | ||
protobuf_convert.c | ||
protobuf_convert.h | ||
README.md | ||
state_types.h | ||
state.c | ||
state.h | ||
version.c | ||
version.h |
Strawman protocol for lightning channels.
The wire protocol is documented in lightning.proto (a protobuf definition file).
There are command line utilities to create and process various packets in test-cli.
It requires features not currently in bitcoin, so it runs on top of the sidechain Elements Alpha
This is very much a testbed and work in progress; expect All The Things to change, all the time.
Cheers,
Rusty.