We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 65f49af + 02c2663 commit 8bd7f4dCopy full SHA for 8bd7f4d
1 file changed
src/chain/bitcoind.rs
@@ -261,6 +261,7 @@ impl BitcoindChainSource {
261
log_info!(self.logger, "Starting continuous polling for chain updates.");
262
263
// Start the polling loop.
264
+ let mut last_best_block_hash = None;
265
loop {
266
tokio::select! {
267
_ = stop_sync_receiver.changed() => {
@@ -278,7 +279,12 @@ impl BitcoindChainSource {
278
279
).await;
280
}
281
_ = fee_rate_update_interval.tick() => {
- let _ = self.update_fee_rate_estimates().await;
282
+ if last_best_block_hash != Some(channel_manager.current_best_block().block_hash) {
283
+ let update_res = self.update_fee_rate_estimates().await;
284
+ if update_res.is_ok() {
285
+ last_best_block_hash = Some(channel_manager.current_best_block().block_hash);
286
+ }
287
288
289
290
0 commit comments