signature: wrap almost all signatures in struct bitcoin_signature.

This is prep work for when we sign htlc txs with
SIGHASH_SINGLE|SIGHASH_ANYONECANPAY.

We still deal with raw signatures for the htlc txs at the moment, since
we send them like that across the wire, and changing that was simply too
painful (for the moment?).

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2018-12-03 09:45:06 +10:30
committed by Christian Decker
parent bbc4a599dc
commit dffe2f516a
31 changed files with 287 additions and 157 deletions

View File

@@ -133,7 +133,7 @@ static struct channel *
wallet_commit_channel(struct lightningd *ld,
struct uncommitted_channel *uc,
struct bitcoin_tx *remote_commit,
secp256k1_ecdsa_signature *remote_commit_sig,
struct bitcoin_signature *remote_commit_sig,
const struct bitcoin_txid *funding_txid,
u16 funding_outnum,
u64 funding_satoshi,
@@ -230,7 +230,7 @@ static void opening_funder_finished(struct subd *openingd, const u8 *resp,
struct bitcoin_txid funding_txid, expected_txid;
struct pubkey changekey;
struct crypto_state cs;
secp256k1_ecdsa_signature remote_commit_sig;
struct bitcoin_signature remote_commit_sig;
struct bitcoin_tx *remote_commit;
u16 funding_outnum;
u32 feerate;
@@ -412,7 +412,7 @@ static void opening_fundee_finished(struct subd *openingd,
u8 *funding_signed;
struct channel_info channel_info;
struct crypto_state cs;
secp256k1_ecdsa_signature remote_commit_sig;
struct bitcoin_signature remote_commit_sig;
struct bitcoin_tx *remote_commit;
struct lightningd *ld = openingd->ld;
struct bitcoin_txid funding_txid;