Browse Source

chaintopology: always initialize smoothed feerate if it's the first entry.

Not just during startup: we could have bitcoind not give estimates until
later, but we don't want to smooth with zero.

The test changes in next patch trigger this, so I didn't write a test
with this patch.

Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
ppa-0.6.1
Rusty Russell 7 years ago
parent
commit
a75de62477
  1. 2
      lightningd/chaintopology.c

2
lightningd/chaintopology.c

@ -309,7 +309,7 @@ static void update_feerates(struct bitcoind *bitcoind,
continue;
/* Initial smoothed feerate is the polled feerate */
if (topo->feerate_uninitialized) {
if (!topo->feerate[i]) {
old_feerates[i] = feerate;
log_debug(topo->log,
"Smoothed feerate estimate for %s initialized to polled estimate %u",

Loading…
Cancel
Save