lightningd: explictly split htlc_in and htlc_out.

They share some fields, but they're basically different, and it's clearest
to treat them differently in most places.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2017-06-20 15:23:03 +09:30
parent ae62509b58
commit 207eeae1f7
7 changed files with 530 additions and 348 deletions

View File

@@ -108,7 +108,8 @@ static struct lightningd *new_lightningd(const tal_t *ctx)
list_head_init(&ld->peers);
ld->peer_counter = 0;
ld->dev_debug_subdaemon = NULL;
htlc_end_map_init(&ld->htlc_ends);
htlc_in_map_init(&ld->htlcs_in);
htlc_out_map_init(&ld->htlcs_out);
ld->dev_disconnect_fd = -1;
ld->dstate.log_book = new_log_book(&ld->dstate, 20*1024*1024,LOG_INFORM);
ld->log = ld->dstate.base_log = new_log(&ld->dstate,