daemon: handle feechange requests.

I originally overloaded struct htlc for this, as they go through the
same states, but separating them turned out to be clearer.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2016-08-26 15:31:19 +09:30
parent 2c7256ac69
commit e7b003b499
10 changed files with 488 additions and 47 deletions

View File

@@ -7,6 +7,7 @@
#include "bitcoin/script.h"
#include "bitcoin/shadouble.h"
#include "channel.h"
#include "feechange.h"
#include "htlc.h"
#include "lightning.pb-c.h"
#include "netaddr.h"
@@ -190,6 +191,9 @@ struct peer {
/* All HTLCs. */
struct htlc_map htlcs;
/* We only track one feechange per state: last one counts. */
struct feechange *feechanges[FEECHANGE_STATE_INVALID];
/* Current ongoing packetflow */
struct io_data *io_data;