mirror of
https://github.com/ElementsProject/lightning.git
synced 2025-02-22 06:41:44 +01:00
txfilter_add_derkey: track p2tr scripts
This commit is contained in:
parent
fdbb31e4d0
commit
01a79fcd59
2 changed files with 4 additions and 2 deletions
|
@ -69,13 +69,15 @@ void txfilter_add_scriptpubkey(struct txfilter *filter, const u8 *script TAKES)
|
|||
void txfilter_add_derkey(struct txfilter *filter,
|
||||
const u8 derkey[PUBKEY_CMPR_LEN])
|
||||
{
|
||||
u8 *skp, *p2sh;
|
||||
u8 *skp, *p2sh, *p2tr;
|
||||
|
||||
skp = scriptpubkey_p2wpkh_derkey(tmpctx, derkey);
|
||||
p2sh = scriptpubkey_p2sh(tmpctx, skp);
|
||||
p2tr = scriptpubkey_p2tr_derkey(tmpctx, derkey);
|
||||
|
||||
txfilter_add_scriptpubkey(filter, take(skp));
|
||||
txfilter_add_scriptpubkey(filter, take(p2sh));
|
||||
txfilter_add_scriptpubkey(filter, take(p2tr));
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -22,7 +22,7 @@ struct txfilter *txfilter_new(const tal_t *ctx);
|
|||
* This ensures that we recognize the scriptpubkeys to our keys when
|
||||
* filtering transactions. If any of the outputs matches the
|
||||
* scriptpubkey then the transaction is marked as a match. Adds
|
||||
* scriptpubkey for both raw p2wpkh and p2wpkh wrapped in p2sh.
|
||||
* scriptpubkey for taproot, raw p2wpkh and p2wpkh wrapped in p2sh.
|
||||
*/
|
||||
void txfilter_add_derkey(struct txfilter *filter,
|
||||
const u8 derkey[PUBKEY_CMPR_LEN]);
|
||||
|
|
Loading…
Add table
Reference in a new issue