Rusty Russell
ef28b6112c
status: use common status codes for all the failures.
This change is really to allow us to have a --dev-fail-on-subdaemon-fail option
so we can handle failures from subdaemons generically.
It also neatens handling so we can have an explicit callback for "peer
did something wrong" (which matters if we want to close the channel in
that case).
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
7 years ago
Rusty Russell
bbed5e3411
Rename subdaemons, move them into top level.
We leave the *build* results in lightningd/ for ease of in-place testing though.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
7 years ago
Rusty Russell
a37c165cb9
common: move some files out of lightningd/
Basically all files shared by different daemons.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
7 years ago
Rusty Russell
c389215a35
closingd: send the tx to master as we negotiate.
We can derive fees from this, and also broadcast at any time without
having to reconstruct it.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
7 years ago
Rusty Russell
2b7c091e70
closing: update to match proposal to restart negotiation on reconnect.
This simplifies significantly, as we don't need to remember what we offered.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
0c5e238a48
lightningd: handle reconnect during shutdown and closing.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago
Rusty Russell
e5a8a7502c
lightningd/closing: subdaemon for closing negotiation.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
8 years ago