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

@@ -34,5 +34,6 @@ struct bitcoin_tx *create_commit_tx(const tal_t *ctx,
struct peer *peer,
const struct sha256 *rhash,
const struct channel_state *cstate,
enum htlc_side side);
enum htlc_side side,
bool *otherside_only);
#endif