mirror of
https://github.com/aljazceru/lightning.git
synced 2025-12-19 23:24:27 +01:00
bitcoin/script: support variants where we only have the ripemd.
For space saving, we only keep the ripemd160 for old HTLCs. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
@@ -11,6 +11,7 @@ struct bitcoin_tx_input;
|
||||
struct preimage;
|
||||
struct pubkey;
|
||||
struct sha256;
|
||||
struct ripemd160;
|
||||
struct rel_locktime;
|
||||
struct abs_locktime;
|
||||
|
||||
@@ -141,6 +142,19 @@ u8 **bitcoin_htlc_receive_spend_preimage(const tal_t *ctx,
|
||||
const struct preimage *preimage,
|
||||
const u8 *wscript);
|
||||
|
||||
/* Underlying functions for penalties, where we only keep ripemd160 */
|
||||
u8 *bitcoin_wscript_htlc_offer_ripemd160(const tal_t *ctx,
|
||||
const struct pubkey *localkey,
|
||||
const struct pubkey *remotekey,
|
||||
const struct ripemd160 *payment_ripemd,
|
||||
const struct pubkey *revocationkey);
|
||||
u8 *bitcoin_wscript_htlc_receive_ripemd(const tal_t *ctx,
|
||||
const struct abs_locktime *htlc_abstimeout,
|
||||
const struct pubkey *localkey,
|
||||
const struct pubkey *remotekey,
|
||||
const struct ripemd160 *payment_ripemd,
|
||||
const struct pubkey *revocationkey);
|
||||
|
||||
/* BOLT #3 HTLC-success/HTLC-timeout output */
|
||||
u8 *bitcoin_wscript_htlc_tx(const tal_t *ctx,
|
||||
u16 to_self_delay,
|
||||
|
||||
Reference in New Issue
Block a user