txfilter: Expose the txfilter_add_scriptpubkey function

Signed-off-by: Christian Decker <decker.christian@gmail.com>
This commit is contained in:
Christian Decker 2017-12-12 17:33:58 +01:00
parent e4e9e22fe8
commit 2a3c9e96f0
2 changed files with 6 additions and 1 deletions

View File

@ -17,7 +17,7 @@ struct txfilter *txfilter_new(const tal_t *ctx)
return filter;
}
static void txfilter_add_scriptpubkey(struct txfilter *filter, u8 *script)
void txfilter_add_scriptpubkey(struct txfilter *filter, u8 *script)
{
size_t count = tal_count(filter->scriptpubkeys);
tal_resize(&filter->scriptpubkeys, count + 1);

View File

@ -28,4 +28,9 @@ void txfilter_add_derkey(struct txfilter *filter, u8 derkey[PUBKEY_DER_LEN]);
*/
bool txfilter_match(const struct txfilter *filter, const struct bitcoin_tx *tx);
/**
* txfilter_add_scriptpubkey -- Add a serialized scriptpubkey to the filter
*/
void txfilter_add_scriptpubkey(struct txfilter *filter, u8 *script);
#endif /* LIGHTNING_LIGHTNINGD_TXFILTER_H */