MCPcopy Create free account
hub / github.com/ElementsProject/lightning / scriptpubkey_opreturn_padded

Function scriptpubkey_opreturn_padded

bitcoin/script.c:190–199  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

188}
189
190u8 *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
201/* Create an input script which spends p2pkh */
202u8 *bitcoin_redeem_p2pkh(const tal_t *ctx, const struct pubkey *pubkey,

Callers 1

replace_penalty_tx_to_usFunction · 0.85

Calls 2

add_opFunction · 0.85
script_push_bytesFunction · 0.70

Tested by

no test coverage detected