diff --git a/wallet/txfilter.c b/wallet/txfilter.c index 97ac35a88..af32818d0 100644 --- a/wallet/txfilter.c +++ b/wallet/txfilter.c @@ -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)); } diff --git a/wallet/txfilter.h b/wallet/txfilter.h index bed798394..eb904bcdf 100644 --- a/wallet/txfilter.h +++ b/wallet/txfilter.h @@ -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]);