Files
lightning/remove_dust.h
Rusty Russell 23f9c7c209 permute_tx: don't save permutation map.
We no longer need it anywhere.  This simplifies things to the point where
we might as well just not include dust outputs as we go, rather than
explicitly removing them, which gets rid of remove_dust.c as well.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
2016-08-18 14:23:46 +09:30

17 lines
370 B
C

#ifndef LIGHTNING_REMOVE_DUST_H
#define LIGHTNING_REMOVE_DUST_H
#include "config.h"
#include "bitcoin/tx.h"
/* Remove all dust outputs from tx */
void remove_dust(struct bitcoin_tx *tx, int *map);
/* Less than this is dust. */
#define DUST_THRESHOLD 546
static inline bool is_dust(u64 amount)
{
return amount < DUST_THRESHOLD;
}
#endif /* LIGHTNING_REMOVE_DUST_H */