chaintopology: add debug message when we're adjusting due to feerate floor.

But only if we're actually going to change the feerate, otherwise we'd
log every time.

Suggested-by: @ZmnSCPxj
Signed-off-by: Rusty Russell <rusty@rustcorp.com.au>
This commit is contained in:
Rusty Russell
2018-03-20 14:37:30 +10:30
committed by Christian Decker
parent 2e687b9b35
commit 8966a175ee

View File

@@ -324,10 +324,15 @@ static void update_feerates(struct bitcoind *bitcoind,
if (feerate < feerate_floor())
feerate = feerate_floor();
if (feerate != topo->feerate[i])
if (feerate != topo->feerate[i]) {
log_debug(topo->log, "%s feerate %u (was %u)",
feerate_name(i),
feerate, topo->feerate[i]);
if (feerate != satoshi_per_kw[i])
log_debug(topo->log,
"...feerate %u hit floor %u",
satoshi_per_kw[i], feerate);
}
old_feerates[i] = topo->feerate[i];
topo->feerate[i] = feerate;
}