Skip to content

Commit

Permalink
Merge pull request #2108 from kcalvinalvin/2024-01-22-dont-update-mem…
Browse files Browse the repository at this point in the history
…pool

netsync: don't update mempool/fee estimator unless we're synced up
  • Loading branch information
Roasbeef committed Feb 27, 2024
2 parents d55c55a + c17cf80 commit 5b6d265
Showing 1 changed file with 7 additions and 0 deletions.
7 changes: 7 additions & 0 deletions netsync/manager.go
Original file line number Diff line number Diff line change
Expand Up @@ -1454,6 +1454,13 @@ func (sm *SyncManager) handleBlockchainNotification(notification *blockchain.Not

// A block has been connected to the main block chain.
case blockchain.NTBlockConnected:
// Don't attempt to update the mempool if we're not current.
// The mempool is empty and the fee estimator is useless unless
// we're caught up.
if !sm.current() {
return
}

block, ok := notification.Data.(*btcutil.Block)
if !ok {
log.Warnf("Chain connected notification is not a block.")
Expand Down

0 comments on commit 5b6d265

Please sign in to comment.