peer: keep a single HTLC map for all htlcs.

Not separate "locally-offered" and "remotely-offered" ones; we can
distinguish them by htlc->state now.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2016-08-18 14:23:45 +09:30
parent 4b5ec85c25
commit 1af3428c6c
3 changed files with 12 additions and 49 deletions

View File

@@ -96,10 +96,6 @@ struct peer_visible_state {
/* cstate to generate next commitment tx. */
struct channel_state *staging_cstate;
/* FIXME: Use single map in struct peer. */
/* HTLCs offered by this side */
struct htlc_map htlcs;
};
/* Off peer->outgoing_txs */
@@ -184,7 +180,10 @@ struct peer {
const struct commit_info *ci;
const struct bitcoin_tx **resolved;
} closing_onchain;
/* All HTLCs. */
struct htlc_map htlcs;
/* Current ongoing packetflow */
struct io_data *io_data;