protocol: no signature in update_commit if receiver has no outputs.

So if there are no HTLCs, and the receiver can't spend anyway, don't
sign.  This has the added benefit that no two signed commitment
transactions will ever be identical (the revocation preimage changes).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2016-08-18 14:25:13 +09:30
parent 5f4b4525b3
commit 8a3c9908ce
8 changed files with 92 additions and 52 deletions

View File

@@ -648,7 +648,7 @@ static void send_commit(struct peer *peer)
/* BOLT #2:
*
* A sending node MUST apply all remote acked and unacked
* ...a sending node MUST apply all remote acked and unacked
* changes except unacked fee changes to the remote commitment
* before generating `sig`.
*/