Skip to content

Commit 4bc357f

Browse files
committed
bitcoin: remove unused scriptpubkey_opreturn_padded.
I noticed, because it pulled in randomness routines. Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
1 parent 9987b6f commit 4bc357f

File tree

2 files changed

+0
-17
lines changed

2 files changed

+0
-17
lines changed

bitcoin/script.c

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -187,17 +187,6 @@ u8 *scriptpubkey_p2pkh(const tal_t *ctx, const struct bitcoin_address *addr)
187187
return script;
188188
}
189189

190-
u8 *scriptpubkey_opreturn_padded(const tal_t *ctx)
191-
{
192-
u8 *script = tal_arr(ctx, u8, 0);
193-
u8 random[20];
194-
randombytes_buf(random, sizeof(random));
195-
196-
add_op(&script, OP_RETURN);
197-
script_push_bytes(&script, random, sizeof(random));
198-
return script;
199-
}
200-
201190
/* Create an input script which spends p2pkh */
202191
u8 *bitcoin_redeem_p2pkh(const tal_t *ctx, const struct pubkey *pubkey,
203192
const struct bitcoin_signature *sig)

bitcoin/script.h

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,6 @@ u8 *scriptpubkey_p2sh_hash(const tal_t *ctx, const struct ripemd160 *redeemhash)
2626
/* Create an output script using p2pkh */
2727
u8 *scriptpubkey_p2pkh(const tal_t *ctx, const struct bitcoin_address *addr);
2828

29-
/* Create a prunable output script with 20 random bytes.
30-
* This is needed since a spend from a p2wpkh to an `OP_RETURN` without
31-
* any other outputs would result in a transaction smaller than the
32-
* minimum size. */
33-
u8 *scriptpubkey_opreturn_padded(const tal_t *ctx);
34-
3529
/* Create an input script which spends p2pkh */
3630
u8 *bitcoin_redeem_p2pkh(const tal_t *ctx, const struct pubkey *pubkey,
3731
const struct bitcoin_signature *sig);

0 commit comments

Comments
 (0)