From 011f3c1e14625b8eeedfc0f7f74dba20ec8ca433 Mon Sep 17 00:00:00 2001 From: Vincenzo Palazzo Date: Wed, 7 Jun 2023 11:58:39 +0200 Subject: [PATCH] lightnind: cleanup not necessary logs This is just housekeeping that allows up to do not spam the logs of people with not useful information. Signed-off-by: Vincenzo Palazzo --- lightningd/chaintopology.c | 12 ++---------- tests/test_closing.py | 2 +- 2 files changed, 3 insertions(+), 11 deletions(-) diff --git a/lightningd/chaintopology.c b/lightningd/chaintopology.c index 6e14e9048..88fd91bdb 100644 --- a/lightningd/chaintopology.c +++ b/lightningd/chaintopology.c @@ -470,19 +470,11 @@ static void smooth_one_feerate(const struct chain_topology *topo, /* But to avoid updating forever, only apply smoothing when its * effect is more then 10 percent */ - if (abs((int)rate->rate - (int)feerate_smooth) > (0.1 * rate->rate)) { + if (abs((int)rate->rate - (int)feerate_smooth) > (0.1 * rate->rate)) rate->rate = feerate_smooth; - log_debug(topo->log, - "... polled feerate estimate for %u blocks smoothed to %u (alpha=%.2f)", - rate->blockcount, rate->rate, alpha); - } - if (rate->rate < get_feerate_floor(topo)) { + if (rate->rate < get_feerate_floor(topo)) rate->rate = get_feerate_floor(topo); - log_debug(topo->log, - "... feerate estimate for %u blocks hit floor %u", - rate->blockcount, rate->rate); - } if (rate->rate != feerate_smooth) log_debug(topo->log, diff --git a/tests/test_closing.py b/tests/test_closing.py index 0f4f23f62..6d5f635d6 100644 --- a/tests/test_closing.py +++ b/tests/test_closing.py @@ -2593,7 +2593,7 @@ def test_onchain_all_dust(node_factory, bitcoind, executor): # Make l1's fees really high (and wait for it to exceed 50000) l1.set_feerates((1000000, 1000000, 1000000, 1000000)) - l1.daemon.wait_for_log('feerate estimate for 6 blocks smoothed to [56789][0-9]{4}') + wait_for(lambda: all(e['smoothed_feerate'] > 50000 for e in l1.rpc.feerates('perkw')['perkw']['estimates'])) bitcoind.generate_block(1) l1.daemon.wait_for_log(' to ONCHAIN')