Browse Source

elements: Add elements overhead to sweep transactions

Turns out we weren't yet.
travis-debug
Christian Decker 5 years ago
committed by Rusty Russell
parent
commit
81abf14142
  1. 1
      onchaind/onchaind.c

1
onchaind/onchaind.c

@ -332,6 +332,7 @@ static struct bitcoin_tx *tx_to_us(const tal_t *ctx,
/* Worst-case sig is 73 bytes */
weight = bitcoin_tx_weight(tx) + 1 + 3 + 73 + 0 + tal_count(wscript);
weight = elements_add_overhead(weight, 1, 1);
fee = amount_tx_fee(feerate_per_kw, weight);
/* Result is trivial? Spend with small feerate, but don't wait

Loading…
Cancel
Save