mirror of
https://github.com/ElementsProject/lightning.git
synced 2026-08-20 13:27:36 +02:00
remove_dust: don't ever create dust outputs.
This behavior will be specified in BOLT #3. Closes: #14 Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
parent
7614e513bd
commit
a150bd191a
4 changed files with 45 additions and 0 deletions
|
|
@ -7,6 +7,7 @@
|
|||
#include "funding.h"
|
||||
#include "overflows.h"
|
||||
#include "permute_tx.h"
|
||||
#include "remove_dust.h"
|
||||
#include <assert.h>
|
||||
|
||||
static bool add_htlc(struct bitcoin_tx *tx, size_t n,
|
||||
|
|
@ -98,5 +99,7 @@ struct bitcoin_tx *create_commit_tx(const tal_t *ctx,
|
|||
|
||||
*map = tal_arr(ctx, int, tx->output_count);
|
||||
permute_outputs(tx->output, tx->output_count, *map);
|
||||
remove_dust(tx, *map);
|
||||
|
||||
return tx;
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue