bitcoind: keep running fee estimate.

This avoids us having to query it when we create anchor transaction, and
lets us always use dynamic fee information.

The config options for max and min are now percentages, rather than absolute.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2016-08-18 14:23:46 +09:30
parent ab38fd7542
commit 02cb7abd9d
11 changed files with 97 additions and 101 deletions

View File

@@ -191,9 +191,8 @@ static void process_estimatefee_6(struct bitcoin_cli *bcli)
if (fee < 0) {
log_unusual(bcli->dstate->base_log,
"Unable to estimate fee, using %"PRIu64,
bcli->dstate->config.closing_fee_rate);
fee_rate = bcli->dstate->config.closing_fee_rate;
"Unable to estimate fee");
fee_rate = 0;
} else {
/* Since we used 6 as an estimate, double it. */
fee *= 2;