channeld: pass htlcs to master daemon in batches.

When adding their HTLCs, it needs all the information.  When failing,
it needs the id as key and the failure reason.  When fulfilling, it
needs the id and payment preimage.

It also needs to know when we have received an revoke_and_ack or a
commitment_signed, to place in the database.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2017-06-20 15:20:03 +09:30
parent dcb3af7d7c
commit 4a161b710d
10 changed files with 890 additions and 288 deletions

View File

@@ -219,7 +219,7 @@ class LightningDTests(BaseLightningDTests):
l1.daemon.wait_for_log('Sending commit_sig with 0 htlc sigs')
l2.daemon.wait_for_log('their htlc 0 locked')
l2.daemon.wait_for_log('failed htlc 0 code 0x400f')
l1.daemon.wait_for_log('htlc 0 failed with code 0x400f')
l1.daemon.wait_for_log('htlc 0 failed from 0th node with code 0x400f')
# Set up invoice (non-dust, just to test), and pay it.
# This one isn't dust.