Browse Source

txfilter: Expose the txfilter_add_scriptpubkey function

Signed-off-by: Christian Decker <decker.christian@gmail.com>
ppa-0.6.1
Christian Decker 7 years ago
parent
commit
2a3c9e96f0
  1. 2
      lightningd/txfilter.c
  2. 5
      lightningd/txfilter.h

2
lightningd/txfilter.c

@ -17,7 +17,7 @@ struct txfilter *txfilter_new(const tal_t *ctx)
return filter; 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); size_t count = tal_count(filter->scriptpubkeys);
tal_resize(&filter->scriptpubkeys, count + 1); tal_resize(&filter->scriptpubkeys, count + 1);

5
lightningd/txfilter.h

@ -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); 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 */ #endif /* LIGHTNING_LIGHTNINGD_TXFILTER_H */

Loading…
Cancel
Save