mirror of
https://github.com/btcsuite/btcd.git
synced 2025-02-22 22:25:45 +01:00
Merge pull request #2108 from kcalvinalvin/2024-01-22-dont-update-mempool
netsync: don't update mempool/fee estimator unless we're synced up
This commit is contained in:
commit
5b6d265dd9
1 changed files with 7 additions and 0 deletions
|
@ -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.")
|
||||
|
|
Loading…
Add table
Reference in a new issue