Remove Alpha support.

I had already disabled it, and this clears the decks for Segregated Witness
which gives us everything we want.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2016-04-11 16:32:43 +09:30
parent 0f35441a29
commit 8104886503
12 changed files with 48 additions and 342 deletions

View File

@@ -107,8 +107,7 @@ static void add_push_key(u8 **scriptp, const struct pubkey *key)
static void add_push_sig(u8 **scriptp, const struct bitcoin_signature *sig)
{
/* Bitcoin wants DER encoding. */
#if SCRIPTS_USE_DER
/* Bitcoin wants DER encoding. */
u8 der[73];
secp256k1_context *secpctx = secp256k1_context_create(0);
size_t len = signature_to_der(secpctx, der, &sig->sig);
@@ -117,12 +116,6 @@ static void add_push_sig(u8 **scriptp, const struct bitcoin_signature *sig)
der[len++] = sig->stype;
add_push_bytes(scriptp, der, len);
secp256k1_context_destroy(secpctx);
#else /* Alpha uses raw encoding */
u8 with_sighash[sizeof(sig->sig) + 1];
memcpy(with_sighash, &sig->sig, sizeof(sig->sig));
with_sighash[sizeof(sig->sig)] = sig->stype;
add_push_bytes(scriptp, with_sighash, sizeof(with_sighash));
#endif
}
/* FIXME: permute? */