mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-24 01:24:26 +01:00
Remove unused functions not covered by unit tests
This commit is contained in:
committed by
Rusty Russell
parent
b914062465
commit
6269a4c55d
@@ -259,16 +259,6 @@ u8 *bitcoin_scriptsig_p2sh_p2wpkh(const tal_t *ctx, const struct pubkey *key)
|
||||
return script;
|
||||
}
|
||||
|
||||
/* Create an input which spends the p2sh-p2wpkh. */
|
||||
void bitcoin_witness_p2sh_p2wpkh(const tal_t *ctx,
|
||||
struct bitcoin_tx_input *input,
|
||||
const secp256k1_ecdsa_signature *sig,
|
||||
const struct pubkey *key)
|
||||
{
|
||||
input->script = bitcoin_scriptsig_p2sh_p2wpkh(ctx, key);
|
||||
input->witness = bitcoin_witness_p2wpkh(ctx, sig, key);
|
||||
}
|
||||
|
||||
u8 **bitcoin_witness_p2wpkh(const tal_t *ctx,
|
||||
const secp256k1_ecdsa_signature *sig,
|
||||
const struct pubkey *key)
|
||||
@@ -495,26 +485,6 @@ u8 *bitcoin_wscript_to_local(const tal_t *ctx, u16 to_self_delay,
|
||||
return script;
|
||||
}
|
||||
|
||||
u8 **bitcoin_to_local_spend_revocation(const tal_t *ctx,
|
||||
const secp256k1_ecdsa_signature *revocation_sig,
|
||||
const u8 *wscript)
|
||||
{
|
||||
/* BOLT #3:
|
||||
*
|
||||
* If a revoked commitment transaction is published, the other party
|
||||
* can spend this output immediately with the following witness:
|
||||
*
|
||||
* <revocation_sig> 1
|
||||
*/
|
||||
u8 **witness = tal_arr(ctx, u8 *, 3);
|
||||
|
||||
witness[0] = stack_sig(witness, revocation_sig);
|
||||
witness[1] = stack_number(witness, 1);
|
||||
witness[2] = tal_dup_arr(witness, u8, wscript, tal_len(wscript), 0);
|
||||
|
||||
return witness;
|
||||
}
|
||||
|
||||
/* BOLT #3:
|
||||
*
|
||||
* #### Offered HTLC Outputs
|
||||
|
||||
Reference in New Issue
Block a user