Rusty Russell
975a5b2041
scriptsig_p2sh_2of2: fix sig order.
Must match key order, which we permute.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
10 years ago
Rusty Russell
16baa1dae9
create-commit-spend-tx: spend the commit tx (after timeout)
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
10 years ago
Rusty Russell
114b7afbe2
bitcoin_script: fix bug in complex anchor redeem script.
We need to pop off the stack after OP_CHECKSEQUENCEVERIFY.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
10 years ago
Rusty Russell
3a4d8cd282
bitcoin_script: use OP_NOP dummy for now, as bitcoind rejects OP_NOP3
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
10 years ago
Rusty Russell
3c7e11fd65
bitcoin_script: DER correctly when we have leading zeroes.
Happens one in 128 times, I guess...
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
10 years ago
Rusty Russell
126192a842
create-steal-tx: get my money back!
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
10 years ago
Rusty Russell
e1532ce044
bitcoin_script: get rid of scriptpubkey_pay_to_pubkeyhash.
We no longer generate any pay-to-pubkeys.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
10 years ago
Rusty Russell
cbad9a1fa5
bitcoin_script: remember to push extra 0 for OP_CHECKMULTISIG.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
10 years ago
Rusty Russell
769d2fd722
bitcoin_script: fix out-by-one error in multisig.
Was using 3 instead of 2. OP_LITERAL() was a bad idea anyway,
as it would only handle numbers up to 16 (and we use 32).
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
10 years ago
Rusty Russell
17c56a8cfc
Fix DER encoding.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
10 years ago
Rusty Russell
abac31072e
open-anchor-scriptsig: use pubkey, not addr in scriptsig.
Oops.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
10 years ago
Rusty Russell
3ed87c5e6f
anchor: fix anchor production for RIPEMD hash.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
10 years ago
Rusty Russell
c291d19af6
Add check-commit-sig.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
10 years ago
Rusty Russell
316f29cb69
bitcoin_script: wean entirely off protobuf types.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
10 years ago
Rusty Russell
f911b2b6df
Use pubkey structures in bitcoin_script, rather than protobufs.
This ensures we do checking beforehand, and keeps abstractions clear.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
10 years ago
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>
10 years ago
Rusty Russell
64b443dcd9
Add doubts on me & you sig on commit transaction.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
10 years ago
Rusty Russell
bf38ca052e
open-commit-sig: create signature for commit tx.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
10 years ago
Rusty Russell
949c8c8d67
Fix redeem-2of2 script.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
10 years ago
Rusty Russell
670670f138
open-anchor-sig, many fixes for open-channel.
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
10 years ago