Commit Graph

3 Commits

Author SHA1 Message Date
Rusty Russell 96585e1b00 create-steal-tx: fix it.
Couldn't be tested until we could generate updates; fixed now.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2015-06-10 21:39:55 +09:30
Rusty Russell ed3f0115d6 protocol: fix horribly thinko, keep own secrets.
I had each side using the other side's hash secret.  That's a very
dumb idea, since it means you can steal from a unilateral close!

A's secret applies to A's commit transaction: it needs the
secret and B's final signature to steal funds, and that should
never happen (since A doesn't have the B's final signature, and
once A has given B the secret, they never broadcast the commit tx).

This makes the update a 4 step dance, since you need the new
revocation hash to make the other side's TX to sign.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2015-06-10 21:39:45 +09:30
Rusty Russell 126192a842 create-steal-tx: get my money back!
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2015-06-05 17:22:54 +09:30