Rusty Russell
fc4a7cf103
channeld: return htlc from channel_add_htlc and channel_fail_htlc.
...
Callers often want to know, and it saves them doing another lookup.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-12-02 12:54:12 +01:00
Rusty Russell
02411b04e4
channel: remove awaiting_revoke_and_ack flag.
...
We can tell this more generically because the count of revocations
received != count of commitments sent. This is the correct condition
which allows us to restore the test we had to eliminate in
c3cb7f1c85
.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-12-02 12:52:18 +01:00
Rusty Russell
8999e2293a
channeld: implement approx_max_feerate.
...
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-11-23 12:40:32 +01:00
Rusty Russell
f45d962a14
channeld: implement and refine fee-related functions.
...
We had some in the header, now implement them, and add a channel_feerate()
accessor.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-11-23 12:40:32 +01:00
Rusty Russell
b836b452dc
feerate: keep feerates separately for each side.
...
When we support changing them, they can be different during the transition.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-11-23 12:40:32 +01:00
Rusty Russell
f1e4cad9d4
feerate: use u32 everywhere.
...
The wire protocol uses this, in the assumption that we'll never see feerates
in excess of 4294967 satoshi per kiloweight.
So let's use that consistently internally as well.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-11-23 12:40:32 +01:00
Rusty Russell
7e13e9e457
channeld: don't allow NULL htlcmap for full_channel
...
That was only for the initial state, which is now in initial_channel.c.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2017-09-03 02:01:54 +02:00
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>
2017-08-29 17:54:14 +02:00