Commit Graph

9 Commits

Author SHA1 Message Date
Rusty Russell 29d0cdc3cd open-channel: use pubkey, not arbitrary script for final outout address.
We need to pay to this from two places: on their side, it's a simple
payment, on our side, it's a complex timeout-or-mutual-or-hval script,
which doesn't lend itself to arbitrary scripts.

Use P2SH, of course.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2015-06-05 11:37:27 +09:30
Rusty Russell 67f98fe6b6 Rename "anchor sig" to "anchor scriptsigs" to be clearer.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2015-06-04 12:10:01 +09:30
Rusty Russell 07c7214edb Explicit pubkey structure.
This checks that the protobuf is the right form, also handles uncompressed
keys (though you shouldn't be using those any more, should you?)

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2015-06-02 11:53:59 +09:30
Rusty Russell 7c977a7633 Move signature <-> proto conversions to signature.c, check lower bit.
Make sure signature can be used by bitcoin.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2015-06-01 14:24:18 +09:30
Rusty Russell eec612af9f Use raw 64-byte signatures in protocol.
DER encoding introduces problems for non-canonical encodings; we should
do that only at the lightning<->bitcoin interface.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2015-06-01 13:04:00 +09:30
Rusty Russell bf38ca052e open-commit-sig: create signature for commit tx.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2015-05-30 20:12:14 +09:30
Rusty Russell 10133575b9 leak-anchor-sigs: the horrible hack until we have normalized txs.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2015-05-30 20:12:14 +09:30
Rusty Russell 670670f138 open-anchor-sig, many fixes for open-channel.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2015-05-29 10:51:16 +09:30
Rusty Russell 1c4fdce514 Initial silly cmdline util to create an openchannel packet.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2015-05-26 14:08:38 +09:30