funding: take into account HTLC add/remove.

Enhance funding_delta() to have an HTLC delta as well as an A->B delta.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2015-08-07 12:45:30 +09:30
parent 88ca0c91d9
commit a09c0a9fa7
3 changed files with 14 additions and 5 deletions

View File

@@ -92,7 +92,7 @@ struct channel_state *gather_updates(const tal_t *ctx,
get_rhash(pkt->update->revocation_hash,
&old_our_rhash, our_rhash);
}
if (!funding_delta(o1, o2, oa, delta,
if (!funding_delta(o1, o2, oa, delta, 0,
&cstate->a, &cstate->b))
errx(1, "Impossible funding update %lli %s",
(long long)delta, *argv);