Skip to content

Commit

Permalink
fixup! txfilter: Add a simple transaction filter
Browse files Browse the repository at this point in the history
  • Loading branch information
cdecker committed Nov 29, 2017
1 parent 12944ff commit 00cad3a
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion lightningd/txfilter.c
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ static void txfilter_add_scriptpubkey(struct txfilter *filter, u8 *script)
filter->scriptpubkeys[count] = tal_dup_arr(filter, u8, script, tal_len(script), 0);
}

void txfilter_add_derkey(struct txfilter *filter, u8 derkey[33])
void txfilter_add_derkey(struct txfilter *filter, u8 derkey[PUBKEY_DER_LEN])
{
tal_t *tmpctx = tal_tmpctx(filter);
u8 *skp, *p2sh;
Expand Down
3 changes: 2 additions & 1 deletion lightningd/txfilter.h
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
#ifndef LIGHTNING_LIGHTNINGD_TXFILTER_H
#define LIGHTNING_LIGHTNINGD_TXFILTER_H
#include "config.h"
#include <bitcoin/pubkey.h>
#include <bitcoin/tx.h>
#include <ccan/short_types/short_types.h>
#include <ccan/tal/tal.h>
Expand All @@ -20,7 +21,7 @@ struct txfilter *txfilter_new(const tal_t *ctx);
* scriptpubkey then the transaction is marked as a match. Adds
* scriptpubkey for both raw p2wpkh and p2wpkh wrapped in p2sh.
*/
void txfilter_add_derkey(struct txfilter *filter, u8 derkey[33]);
void txfilter_add_derkey(struct txfilter *filter, u8 derkey[PUBKEY_DER_LEN]);

/**
* txfilter_match -- Check whether the tx matches the filter
Expand Down

0 comments on commit 00cad3a

Please sign in to comment.