StephenM347 on #lightning-dev indicated it could be clearer that
this is all about changing commitment transactions.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
It's slightly clearer to do the "2" outside the branch.
Also, spending it requires the extra 0 due to OP_CHECKMULTISIG bug.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
As reported by mmeijeri on r/Bitcoin:
https://www.reddit.com/r/Bitcoin/comments/3dlxw4/reaching_the_ground_with_lightning_lightning/ct80xpp
As the signature doesn't cover the input itself, you could replace the
secret key from the escape transaction with 0, and it will use the "A and B"
branch of the output.
(This also fixes a bug in the anchor output where the OP_IF consumed the
secret).
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>